Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

p-calendar dateFormat into locale #5585

Closed
rubenns opened this issue Apr 18, 2018 · 3 comments
Closed

p-calendar dateFormat into locale #5585

rubenns opened this issue Apr 18, 2018 · 3 comments
Assignees
Labels
Type: New Feature Issue contains a new feature or new component request
Milestone

Comments

@rubenns
Copy link

rubenns commented Apr 18, 2018

I'm submitting a ... (check one with "x")

[ ] bug report => Search github for a similar issue or PR before submitting
[x ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Current behavior
You need to put the date format like a input.

Expected behavior
set de date format into calendar locale settings.

What is the motivation / use case for changing the behavior?
It's necessary to create a settings by locale and the format depends of the locale, then it's a good improvement to set directly the format date, and if you want to rewrite this format, you can set the format from the input.

  • Angular version: 5.2.0
  • PrimeNG version: 5.2.4
@cagataycivici cagataycivici added the Type: New Feature Issue contains a new feature or new component request label Dec 17, 2018
@cagataycivici cagataycivici added this to the 7.0.4 milestone Dec 17, 2018
@cagataycivici cagataycivici self-assigned this Dec 17, 2018
@WouterBos
Copy link

I encountered this same issue in version 7.1.2 The got around this issue to use the separate [dateFormat] attribute.

<p-calendar formControlName="expirationDate" id="expirationDate" [dateFormat]="locale.dateFormat" [locale]="locale"></p-calendar>

@da5407
Copy link

da5407 commented Dec 29, 2020

no error message, just not work as locale setting, I need help.

@da5407
Copy link

da5407 commented Dec 29, 2020

<p-calendar [showIcon]="true" name="mdate" id="mdate" formControlName="mdate" [showTime]="false" [locale]="locale" dateFormat="yy/mm/dd" [showButtonBar]="true" [monthNavigator]="true" [yearNavigator]="true" yearRange="2000:2030">

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: New Feature Issue contains a new feature or new component request
Projects
None yet
Development

No branches or pull requests

4 participants