I am using pickadate.js
as a date-picker with the following initialization:
$start_cal_input = $("#start-date-picker").pickadate({
min: true,
max: 30,
editable: true,
clear: false,
formatSubmit: 'yyyy/mm/dd',
hiddenName: true,
onSet: function(e) {
},
onClose: function() {
return setTimeout(function() {
return $("#start-date-picker").blur();
}, 200);
},
onStart: function() {
}
});
and HTML:
<input id="start-date-picker" name="start-date-picker" class="form-control" type="text" value="Start date">
The HTML is posted back to the server in a form, which is used to filter a search criteria. If the user does not actually invoke and select a date with the datepicker, a value of today's today in the 'yyyy/mm/dd'
format is being sent to the form, rather than the default value of "Start date"
. If it is not actually invoked, I don't want to filter my search results by date, but I have no way of distinguishing between the user selecting today's date and the user leaving the date empty and having today's date automatically returned.
How can I determine on form post whether or not the date picker was invoked?