sorajate / jquery-ui-datepicker-extension-buddhist-era

Automatically exported from code.google.com/p/jquery-ui-datepicker-extension-buddhist-era
0 stars 0 forks source link

Problem about Date Range #2

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

I try to use date range like this 
http://jqueryui.com/demos/datepicker/date-range.html

$(".txtDateRange").live("mouseover", function () {
   var dates = $(".txtDateFrom, .txtDateTo").datepicker({
      dateFormat: 'dd-mm-yy',
      isBE: true,
      autoConversionField: true,
      changeMonth: true,
      changeYear: true,
      onSelect: function (selectedDate) {
         var option;

         if (this.id.indexOf('txtDateFrom') > -1)
            option = "minDate";
         else
            option = "maxDate";

         //Set Option
         instance = $(this).data("datepicker"),
         date = $.datepicker.parseDate(
         instance.settings.dateFormat ||
         $.datepicker._defaults.dateFormat,
         selectedDate, instance.settings);

         dates.not(this).datepicker("option", option, date);
      }
   });
});

But it doesn't work. What's wrong with this code.

Original issue reported on code.google.com by Sunti...@gmail.com on 1 Sep 2011 at 7:07

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
If you would like to work you need to set date for maxDate or minDate in 
gregorian calendar instead of puting 4/4/2557 you need to put 4/4/2014

Original comment by i.tanask...@gmail.com on 3 Apr 2014 at 2:11