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

Friday, 11 July 2014

How to find last day of month in jquery datetime picker?

function getLastDayOfYearAndMonth(year, month){
    return(new Date((new Date(year, month + 1, 1)) - 1)).getDate();
}

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 );
   }
});