Created
January 30, 2013 23:36
-
-
Save raytiley/4678433 to your computer and use it in GitHub Desktop.
Just a simple jQueryUI based datepicker
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
<!-- This is the form element that will be transformed into a datepicker --> | |
<div type="text" id="ScheduleDate style="float:left;margin-left:15px"> | |
<!-- This script finds the above datepicker and when a day is selected goes to the current url with a different date --> | |
<!-- EXAMPLE: http://YourServer/Schedule.php?date=2012-01-13 --> | |
<script> | |
$(function() { | |
$("#ScheduleDate").datepicker({ | |
onSelect: function(dateText, inst) { window.location.href = location.href.substring(0,location.href.lastIndexOf("?"))+"?date="+dateText}, | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment