Showing posts with label date range picker. Show all posts
Showing posts with label date range picker. Show all posts

Friday, 20 June 2014

Dynamically Date Range reset in jQuery UI date picker

Removes the datepicker functionality completely. This will return the element back to its pre-init state. 
Code :
$( "#start_date" ).datepicker( "destroy" );
$( "#end_date" ).datepicker( "destroy" );

Thursday, 19 June 2014

jQuery Date picker ui select date range picker

Jquery UI Datepicker select date range between Two days
$( "#start_date" ).datepicker({
   minDate: new Datenew Date(1999, 10 - 1, 25),
   maxDate: new Datenew Date(1999, 10 - 1, 30),
   defaultDate: "+1w",
   changeMonth: true,
   numberOfMonths: 2,
   onClose: function( selectedDate ) {
      $( "#end_date" ).datepicker( "option", "minDate", selectedDate );
   }
});

$( "#end_date" ).datepicker({
   minDate: new Datenew Date(1999, 10 - 1, 25),
   maxDate: new Datenew Date(1999, 10 - 1, 30),
   defaultDate: "+1w",
   changeMonth: true,
   numberOfMonths: 2,
   onClose: function( selectedDate ) {
      $( "#start_date" ).datepicker( "option", "maxDate", selectedDate );
   }
});