Im using xdsoft datetimepicker so users can select a deadline. I would like to show an alert if they choose one of the next 3 days.
Initially I had set a minDate so these days were not selectable but I would prefer if these days can be selected and an alert box is shown instead.
I am not sure if there if an option for this already exists, I could not find one in the documentation.
This is how I've been doing it-
html
<h3>Deadline:</h3>
<input type="text" id="datetimepicker"/>
jquery
$('#datetimepicker').datetimepicker({
timepicker:false,
format:'d/m/Y',
formatDate:'Y/m/d',
minDate:'+1970/01/04',
});
I have also set up a jsfiddle
Thanks guys, if you could steer me in the right path it would be much appreciated
onChangeDateTime
available but it seems that plugin is bit buggy.. It keeps on calling the alert on change.. Not sure how else you can achieve it.. and here's the issue reported which hasn't been fixed. I suggest to choose some other plugin which is more supportive.. – Multicellular