vlio20 / angular-datepicker

Highly configurable date picker built for Angular applications
https://wondrous-crostata-172891.netlify.app/
MIT License
498 stars 142 forks source link

question about Formats #417

Closed nico281 closed 4 years ago

nico281 commented 6 years ago

Hi, im making a form builder and i need to change the format in a configuration but the changes to the config are not being reflected on the input. only after reload the page. there is a way to tell the directive to update the format? Cheers

vlio20 commented 6 years ago

It would be easier to have a stackblitz, so please post one and I will try to help.

nico281 commented 6 years ago

https://stackblitz.com/edit/angular-maohqz my idea is to have the ability to change the format on runtime. If you look at the example, i set a default format but if i change the config format, the input still continue showing the default format and not the updated one.

marcelcremer commented 6 years ago

Hey,

I have the same issue - thx @nico281 for creating the stackblitz.

I want to add, that the same is true when the object changes (which triggers ng change detection).

Forked stackblitz as demo:

https://stackblitz.com/edit/angular-gftrbi?file=src%2Fapp%2Fapp.component.ts

vlio20 commented 6 years ago

Will mark as bug... Will take a look shortly. There are some other things on the pipeline though. If it's really urgent, consider reach via Fiverr.

marcelcremer commented 6 years ago

Thank you @vlio20, if I get into it, I might also send a PR. Unfortunately, I'm having a deadline this week, so maybe I can spend time on it next week.

vlio20 commented 4 years ago

it's working, you shouldn't change it inline: https://stackblitz.com/edit/angular-vh88mz?file=src/app/app.component.ts