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 internal format #1026

Closed
ilianiv opened this issue Oct 5, 2016 · 3 comments
Closed

p-calendar internal format #1026

ilianiv opened this issue Oct 5, 2016 · 3 comments

Comments

@ilianiv
Copy link

ilianiv commented Oct 5, 2016

Existing dateFormat input is nice because I can transform and display my model's dates (that are in ISO 8601) as dd.mm.yy which is more user friendly.

The problem is when I use p-calendar to edit the model. It breaks my model because calendar component sets my dates as dd.mm.yy which is not compatible with angular2's DatePipe, my API, etc ...

Maybe an additional input like internalFormat will help. This may be the format that binds with ngModel.

jQuery UI Datepicker has this feature: dateFormat for parsing and diplaying and an optional altFormat that overrides format shown to the user.

@cagataycivici
Copy link
Member

So you want to use dd.mm.yy for dateFormat when displaying and need an alternative format? Does 1230 and 1231 help your case as well? Can you give us a detailed example with dateFormat, internalFormat and so on.

@ilianiv
Copy link
Author

ilianiv commented Nov 8, 2016

Yes. The idea was Calendar component to be able to work with 2 formats (display format and binded model format). #1230 & #1231 seem to fix this. I'll try it when rc4 gets released.

@cagataycivici
Copy link
Member

Thanks, closing for now, please drop a comment if necessary after RC4 (tomorrow)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants