cant figure it out how can i change the date format… nothing that i’ve tried so far seems to have any effect on the picker. It needs to be straightforward but its not, at least for me.
please provide me an example if its possible.
cant figure it out how can i change the date format… nothing that i’ve tried so far seems to have any effect on the picker. It needs to be straightforward but its not, at least for me.
please provide me an example if its possible.
Hi Tom,
we are using Vaadins default Datepicker in the component.
Unfortunately the DatePicker uses - as far as we know - the client’s dateformat (so in Germany the date 2020-01-01 is shown as 1.1.2020 and in the US it’s shown as 1/1/2020) and there is no built in functionality for changing that.
Note: There is a issue which describes the problem and contains some workarounds: https://github.com/vaadin/flow-components/issues/911
Also created https://github.com/xdev-software/vaadin-date-range-picker/issues/97 for easier integration of the workarounds mentioned above
For using custom formatters and parsers you could try basing the component on the EnhancedDatePicker and EnhancedDateTimePicker. We had the same issue with the date formatter not being available on the standard DatePicker / DateTimePicker on Vaadin 14.7 and decided to use the Enhanced versions.