Primeng: Accept multiple different date formats as input in p-calendar

Created on 16 May 2018  路  5Comments  路  Source: primefaces/primeng

I'm submitting a ...

[ ] bug report
[x] feature request
[ ] support request

Current behavior
The input date must be written in the same format as the output format

Expected behavior
The input date can be written in any of the given formats and will be parsed to the first format that fits

What is the motivation / use case for changing the behavior?
The project I'm working on have a userbase that love to use the keyboard to fill out forms quickly, but also whant a readable date field. To meet the demand, a field that accepts a short date from user and displays a long readable date is needed.

  • Angular version: 5.2.10

  • PrimeNG version: 5.2.7

Most helpful comment

This would help a lot. I may want to display a date as 01-Jan-2019 but want to store it as 2019-01-01.

All 5 comments

If more users will demand it, we'll reconsider.

Another user requesting here. This is just good UX.

This would help a lot. I may want to display a date as 01-Jan-2019 but want to store it as 2019-01-01.

Same here, it would be a really usefull feature.

Is there any way we can use range date selection in (PrimeNG) something like 01/08/2019 to 02/08/2019?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

philly-vanilly picture philly-vanilly  路  3Comments

Helayxa picture Helayxa  路  3Comments

SchneMa picture SchneMa  路  3Comments

miresk picture miresk  路  3Comments

pchristou picture pchristou  路  3Comments