vaadin / vaadin-date-picker

The Web Component providing a date selection field with scrollable month calendar. Part of the Vaadin components.
https://vaadin.com/components
Apache License 2.0
165 stars 78 forks source link

Add ability to customize text output #695

Closed weslowsk closed 4 years ago

weslowsk commented 4 years ago

The text output of date picker is limited to Locales and a particular date format within that Locale. For example: "1/28/2020" I would like the ability to display "January 28, 2020" as the text output instead.

tomivirkki commented 4 years ago

Hi @weslowsk, you can use parseDate and formatDate functions on the <vaadin-date-picker> web component to produce an output in any format. See https://vaadin.com/components/vaadin-date-picker/html-examples/date-picker-localization-demos

If you need this functionality for the Flow DatePicker (Java API), there's an issue about it at https://github.com/vaadin/vaadin-date-picker-flow/issues/156