How do I restrict the start date and the end date to the same month?
- <script type="text/javascript">
- $(function() {
- $( "#from" ).datepicker({
- defaultDate: "+1w",
- numberOfMonths: 1,
- onSelect: function( selectedDate ) {
- $( "#to" ).datepicker( "option", "minDate", selectedDate );
-
- }
- });
-
- $( "#to" ).datepicker({
- defaultDate: "+1w",
- numberOfMonths: 1,
- onSelect: function( selectedDate ) {
- $( "#from" ).datepicker( "option", "maxDate", selectedDate );
- }
- });
-
- $( "input[type=submit]" )
- .button()
-
- });
- </script>