stefangabos / Zebra_Datepicker

A super-lightweight, highly configurable, cross-browser date time picker jQuery plugin
https://stefangabos.github.io/Zebra_Datepicker/
Other
399 stars 183 forks source link

Allow the reference date to be the value of another picker #190

Open ppazos opened 1 year ago

ppazos commented 1 year ago

I'm playing with pair and direction options and it doesn't seem quite right to define a generic datetime range:

  1. picker A top limited by the value of picker B, if there is no value, do not limit
  2. picker B bottom limited by the value of picker A, if there is no value, do not limit

It seems the direction option considers the reference date to today, so I can't set 1st day last month as the picker B value and let picker A be top limited by that value.

Not sure how this could be accomplished. Reading the docs the range pickers seem to be a missing feature "Date ranges (sort of)" https://stefangabos.github.io/Zebra_Datepicker/

To be able to use this picker, ranges is a requirement for my application. The library seems really good for my other use cases, I really like, for instance, the format being specified in the PHP way, and has many other useful options, just lacking on the range thing.

Thanks!

stefangabos commented 1 year ago

yes, setting the pair attribute doesn't work when set to both date pickers. that's why it is eternally called sort of :) might give this a try - proper pairing, with two open pickers - this year. i can commit to anything more exact than that :) but thanks for the feedback!

ppazos commented 1 year ago

@stefangabos please let me know if I can be of help, at least for testing.