formly-js / formly-js/angular-formly-website

ui datepicker and resetModel()

Open
#79 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
18
Forks
24
PR merge metrics
No merged PRs in 30d

Description

There is an issue with using the ui datepicker (and date formats / json) in formly when calling resetModel().

As you can see here, resetModel() actually _removes_ the model for that element. This is the same when using a pre-populated model, or the 'defaultValue' property:

http://jsbin.com/vokowo/edit?html,js,output

Hitting resetModel twice actually fixes the problem - it returns the values to the model. But, of course, this isn't satisfactory as is.

Any ideas?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.