olton / Metro-UI-CSS

Impressive component library for expressive web development! Build responsive projects on the web with the first front-end component library in Metro Style. And now there are even more opportunities every day!
http://metroui.org.ua/
MIT License
7k stars 1.97k forks source link

Calendar Picker broken in 4.5.0 - French localization #1832

Open Falconpage opened 2 years ago

Falconpage commented 2 years ago

Hi Olton, I hope your doing well.

Describe the bug If I use fr-FR localization calendar picker return caracters.

To Reproduce Set the localization to fr-FR, bonus : set for example this default value="28/09/2021"

With this default value I've got "%2/%0/%undefined"

It works well with the default localization.

Thanks

xscode-auto-reply[bot] commented 2 years ago

Thanks for opening a new issue. The author has been notified and will review it as soon as possible. For urgent issues and priority support, visit https://xscode.com/olton/Metro-UI-CSS or Patreon

olton commented 2 years ago

please, create an example on codepen.io

Falconpage commented 2 years ago

https://codepen.io/Falconpage/pen/RwZZvdQ

Thanks :)

KlumsD commented 2 years ago

Hi Falconpage,

I've been able to make it work for french localization using this format : DD/MM/YYYY instead of %d/%m/%Y

Enjoy

skiyonotcco commented 2 years ago

the %d/%m/%Y does not work for me leaving the localization default. However, the "DD/MM/YYYY" format does work. However, I still have an issue where date comes out to be 1 day prior than the date entered in the value. I'm using PHP to have a default value and it always comes out 1 day before the date entered. I made sure the format matches.

I found the issue is caused if you set a default value that has leading zeros. Example: value="2021-05-09" will give you "2021-05-08" in the input. Example2: value="2021-12-05" will give you "2021-12-04" in the input. It works if you do value="2021-5-9" or "2021-12-5" but for data storing and sorting purposes, I want to have leading zeros... Would be great if this can be fixed. Thanks

Falconpage commented 2 years ago

Thanks @KlumsD and @skiyonotcco.

I just realyse that @olton is an ukranian, I hope he is going well. Thanks @olton for all the works you have done and you will do here, take care.

Falconpage commented 1 year ago

Hello @olton , hope you are well. Have you check the codepen ? Thanks