melohagan / budibase-component-kasper-date-picker

Date picker with text input with options to set format, locale, show/hide calendar. Adapted from the Kasper date picker.
11 stars 6 forks source link

Provide correct default date format when locale is selected, e.g. German format is incorrect when no Format is specified #1

Closed agruenberg closed 2 years ago

agruenberg commented 2 years ago

The german date format is usually dd.mm.yyyy. Even if I set local to de, the format is still yyyy-mm-dd H:i:s.

Bildschirmfoto von 2022-10-19 12-22-19 Bildschirmfoto von 2022-10-19 12-22-01

melohagan commented 2 years ago

Hey @agruenberg

You can specify the format you want in the Format field

agruenberg commented 2 years ago

Ok, so the local is only for the language?

melohagan commented 2 years ago

The language and the order of the week days.

I can rename this issue to provide a default locale format, for the case that no format has been provided in the Format field

agruenberg commented 2 years ago

Ok, I think this would be an enhancement, if the local format is also pre populated. Once again: GREAT!

melohagan commented 2 years ago

Default date formats added:

Screenshot 2022-10-20 at 10 19 51

If you provide a custom format, this will override the default locale format: Screenshot 2022-10-20 at 10 20 37