Zebra_Datepicker icon indicating copy to clipboard operation
Zebra_Datepicker copied to clipboard

set_date not working when format is set to 'd M y H:i:s'

Open tarunparswani26 opened this issue 7 years ago • 5 comments

set_date not working when format is set to 'd M y H:i:s'. Please give me a quick fix asap....

As per investigation the 'check_date' function is returning false, tested with both passing a date object or a date string in the same desired format.

I'm using the latest version of Zebra Datepicker

tarunparswani26 avatar Oct 29 '18 12:10 tarunparswani26

Show me some code you are using so that I can easily replicate this. Thanks!

stefangabos avatar Oct 31 '18 14:10 stefangabos

never mind, i am able to reproduce it

stefangabos avatar Oct 31 '18 14:10 stefangabos

ok, the problem is that setting y for years is considered 19xx instead of 20xx... i have no idea how I could fix this as something like 10 Oct 19 23:18:00 could be either 1919 as well as 2019...

stefangabos avatar Oct 31 '18 14:10 stefangabos

ok, i will make this work, but only if you provide a javascript date object. if you give the date as a string it cannot know if it's 19xx or 20xx

stefangabos avatar Oct 31 '18 17:10 stefangabos

@stefangabos that is where your earlier mentioned standards kick in... it's a serious issue when you don't ;) Sorry to say but it's a fact. The objects holds it all.

Yamakasi avatar Nov 01 '18 01:11 Yamakasi