jtsage / jtsage-datebox

A multi-mode date and time picker for Bootstrap (3&4), jQueryMobile, Foundation, Bulma, FomanticUI, and UIKit (or others)
http://datebox.jtsage.dev/
Other
474 stars 166 forks source link

Documentation for calYearPickMin and calYearPickMax is not clear enough. #407

Closed slavap closed 7 years ago

slavap commented 7 years ago

This statement: "< 1,800 :: Number of years from current year" should be changed to: "from currently selected date's year"

Example: selected is today. calYearPickMin and calYearPickMax are both 10. In year picker 2007 - 2027 are populated. Select new date as 02/02/2027. In year picker 2017 - 2037 are populated.

jtsage commented 7 years ago

Huh. Didn't know that I don't think. I will either update the documentation, or does it make more sense for it to be from "this year"?

slavap commented 7 years ago

@jtsage For me it looks like bug. It should be calculated from "now" year IMO, this always changing years interval in picker looks really strange.

jtsage commented 7 years ago

So, I couldn't really decide. To me, having the scale sliding makes a lot of sense in most use cases, but I can see where having it the other way makes sense too. So, a compromise, and a new option:

calYearPickRelative

Set it to true (the default) to keep the old behavior of a sliding scale based on the selected date.

Set it to false to always base it on today's real date.