Search and Top Navigation
#15395 new bug ()
Opened February 15, 2021 06:35AM UTC
Last modified February 15, 2021 06:35AM UTC
dateFormat: 'dd/mm/yy' doesn't support negative years.
Reported by: | drikpanchang | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.datepicker | Version: | 1.12.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
dateFormat: 'dd/mm/yy' doesn't support negative years.
$('#date1').datepicker({ dateFormat: "dd/mm/-yy", yearRange: "-5300:+3000", minDate: new Date(-3227, 5, 23, 0), maxDate: new Date(3000, 11, 31, 0) });
Entering negative number in textbox doesn't update datepicker as expected. It always picks '+ive' year even negative year is available in dropdown list. Setting date format to "dd/mm/yy" don't allow typing "-" in text input field.
Please check it on https://jsfiddle.net/drikpanchang/zntsbwq3/13/ and real usage for negative years on https://www.drikpanchang.com/panchang/day-panchang.html