Closed boxoft closed 10 years ago
yes I have the same idea!
Here is what I do right now:
<script type="text/javascript">
$(function(){
$("#scheduled_from, #scheduled_to").mousedown(function() {
$(this).appendDtpicker();
});
});
</script>
Yes, it will be very useful option!
In date filter on site http://www.planerka.info/tm you can leave finish date null.
To leave input field empty use option "autodateOnStart" for example:
$(function(){
$('*[name=date]').appendDtpicker({
"autodateOnStart": false
});
});
[EDIT: Below comment retracted! I didn't have the most recent version...]
This doesn't seem to make any difference to me. If I have an empty value attribute for the input in my markup, I get JS errors from date.getFullYear().
Ideally, to validate the input, I want to display what the user entered in the input and flag it with a "please enter a date in dd/mm/yyyy format" label, and have dtpicker pop up on click to overwrite the contents.
I think that autodateOnStart should have the effect of making dtpicker neither set nor get contents of the value attribute in the markup (we have 'current' in the options object, after all). If people agree with that then I'll fork...
[I don't retract the below - it would have helped with the above...]
Would be good to have autodateOnStart added to the wiki at least so I can tell if I'm using that correctly. Would also be good to have more commenting in the code!
This plugin seems to add a date (and time) to the input field all the time. I suggest adding an option to make it possible to leave the input field empty by default.