-
-
Notifications
You must be signed in to change notification settings - Fork 338
Description
Feature Request
Currently, there is the onSelect Callback. This callback is called BEFORE the selected date is transferred into the input field.
It would be nice to have a callback which is called AFTER the selected date was transferred to the input field.
My use case is simple: I implemented an auto-Submit form which submits whenever there is a sensible change in an input. Especially for a date, not every input is sensible, e.g. if someone types a date by keyboard. Here, submitting is only sensible when the enter key is pressed.
At the moment, I cant simply call the form submit in onSelect, as the value was not transferred to the input field at that point yet. Hence it is not sent to the server. A onAfterSelect callback would fix this.
At the moment I try to work around this in onSelect by something like:
function(date, mode) {
if(!date) {
return;
}
//set date to input before submitting the form
$(this).find('input').val(dateTodmY(date));
$("#someForm").form('submit');
}