JQuery Datepicker YearRange do not set when you select Date

  datepicker, javascript, jquery

I have custom method for setting yearRange inside datepicker. YearRane Work perfectly fine but when i change date from datepicker the Year displayed in datepicker do not set and only Date get change.

$j(currRow.eq(section.TableColumnIdx.EndDate).find('input')).attr('id', '').removeClass('hasDatepicker').removeData('datepicker').unbind().datepicker({dateFormat:'yy-mm-dd', changeMonth: true, changeYear: true,  yearRange: determineYearRange(endDateVal)
                    , onChangeMonthYear: function(year, month, inst) {
                        onChangeMonthYearDatepicker(year, month, inst);
                    }
                });

Source: Ask Javascript Questions

LEAVE A COMMENT