I recently found the mobipick calendar and I really like it due to its fast performance.
However I am having some trouble setting the minimum date four days from now.
If you go on the mobipick website, you can add min=”…” in the html attribute, but it doesn’t specify today’s date.
The following code can be found on the website as well,
how can I achieve this?
Javascript/Jquery
<script type="text/javascript">
$(document).ready(function () {
var picker = $("#picker", this);
picker.mobipick();
picker.bind("change", function () {
var date = $(this).val();
// formatted date
var dateObject = $(this).mobipick("option", "date");
});
});
</script>
HTML
<input id="picker" type="text" />
In order to set the min date four days from now, create an input element
and add this JavaScript
You need version 0.6 for this example to work, download or fork at GitHub https://github.com/sustainablepace/mobipick. I’ve also added a working example at http://mobipick.sustainablepace.net/demo-advanced.html, see section “Datepicker with dynamic min date”.
Let me know if this works for you.