Created
April 18, 2011 14:19
-
-
Save hleinone/925438 to your computer and use it in GitHub Desktop.
Demonstrates the issue in jQuery Timepicker Addon when setting a minDate with a time value of 9:25, then the time in that date can not be changed to 10:00 since the minimum minute doesn't get updated after the hour changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/themes/base/jquery-ui.css" /> | |
<style type="text/css"> | |
/* css for timepicker */ | |
.ui-timepicker-div .ui-widget-header{ margin-bottom: 8px; } | |
.ui-timepicker-div dl{ text-align: left; } | |
.ui-timepicker-div dl dt{ height: 25px; } | |
.ui-timepicker-div dl dd{ margin: -25px 0 10px 65px; } | |
.ui-timepicker-div td { font-size: 90%; } | |
</style> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> | |
<script type="text/javascript" src="http://trentrichardson.com/examples/timepicker/js/jquery-ui-timepicker-addon.js"></script> | |
<script type="text/javascript"> | |
$().ready(function() { | |
$('#datetime').datetimepicker({ | |
minDate: new Date('April 18, 2011 09:25:00') | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
<input type="text" id="datetime" /> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment