Reputation: 329
Here is a simple timepicker
to jQuery UI's datepicker
<script type="text/javascript">
/* <![CDATA[ */
$(function() {
$('#pickerfield').datetime({
userLang : 'en',
americanMode: true,
});
});
/* ]]> */
</script>
<input id="pickerfield" type="text" value="" />
Now I want to know how to add default date more than 2 days and disable all previous dates
Update
:- I am talking about time picker like this Time picker
Upvotes: 0
Views: 2105
Reputation: 75993
You can just pass in options to the .datetimepicker()
function (I noticed when making my demo that datetime
didn't seem to work) for the jQuery UI Datepicker:
$(function() {
$('#datepicker').datetimepicker({
userLang : 'en',
americanMode : true,
minDate : +2,
defaultDate : +4
});
});
Here is a demo: http://jsfiddle.net/MG6Mb/2/
Upvotes: 0
Reputation: 2750
I think you are looking for something like this http://jsfiddle.net/MG6Mb/
Upvotes: 1