Skip to content

[RFR] Do not update date field actual value if invalid#1334

Merged
jpetitcolas merged 3 commits intomasterfrom
fix_datepicker_values_disappearing
Apr 3, 2017
Merged

[RFR] Do not update date field actual value if invalid#1334
jpetitcolas merged 3 commits intomasterfrom
fix_datepicker_values_disappearing

Conversation

@floo51
Copy link
Copy Markdown
Contributor

@floo51 floo51 commented Apr 3, 2017

Should fix #1305

scope.$watch('rawValue', function(newRawValue) {
// ui bootstrap datepicker set value to undefined
// when the value is invalid and null if empty
const invalid = newRawValue === undefined;
Copy link
Copy Markdown
Contributor

@Kmaschta Kmaschta Apr 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you return if invalid before the field.parse?

Florian FERBACH added 2 commits April 3, 2017 16:46
@floo51 floo51 changed the title [WIP] Do not update date field actual value if invalid [RFR] Do not update date field actual value if invalid Apr 3, 2017
@floo51 floo51 requested a review from jpetitcolas April 3, 2017 14:58
@jpetitcolas jpetitcolas merged commit 9a8957f into master Apr 3, 2017
@jpetitcolas jpetitcolas deleted the fix_datepicker_values_disappearing branch April 3, 2017 15:00
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

Successfully merging this pull request may close these issues.

Date field cannot be typed in

3 participants