Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

input formのdate format対応 #1

Merged
merged 2 commits into from
Mar 28, 2018
Merged

input formのdate format対応 #1

merged 2 commits into from
Mar 28, 2018

Conversation

junamai2000
Copy link

<datepicker ng-model="transfer.transfer_time" date-format="yyyy/MM/dd">
<input type="text" ng-model="transfer.transfer_time">
</datapicker>

上記のような使い方をした場合、正しく動作しないので修正しました。

setViewValue()の値が反映される前に、thisInput. triggerHandler()でイベント発生し、空がinputに入ってしまうので解消してます。

@masayosh4
Copy link

clear-text="取消"とかくと、clearボタン出てくるので、それでclearも同じ状況か試してください。
clear() の方も triggerHandler消してほしいです

@masayosh4 masayosh4 merged commit d4ada46 into master Mar 28, 2018
@junamai2000
Copy link
Author

https://github.com/angular/angular.js/blob/master/src/ng/directive/input.js#L1379
取消の時は、値の変更がないので、triggerHandlerがあっても問題ないようでした。

ややこしいので消しました。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants