kartik-v / yii2-datecontrol

Date control module allowing separation of date formats for View & Model for Yii Framework 2.0.
http://demos.krajee.com/datecontrol
Other
55 stars 29 forks source link

Entering a value into text input when ActiveForm has enableAjaxValidation is true #139

Closed natmars closed 3 years ago

natmars commented 3 years ago

When I use DateControl widget with type DateControl::FORMAT_TIME and ActiveForm has enableAjaxValidation is true, so when I enter a value into the text input id="..-disp" (do not use incrementHour, incrementMinute, which trigger field validation) and if focus won't be moved to another field, then on form submit the field will not have the entered value.

my solution is: $('#booking-enddatetime-time-disp').on('input', function (e) { $('#booking-enddatetime-time-disp').trigger('change'); })

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.