Posted 27 October 2018, 8:56 am EST
Question: How can I set the value of the date to NULL and NOT cause the (valueChange()) event to fire? i.e. I don’t want that event to fire when the page just loads… only when the user interacts with it.
Environment:
- Ionic v2
- Angular
- I’ve added a Wijmo date input component to the HTML of a page
- I bound a component variable to the [value] = “endDate”
- I set the component’s [isRequired] = “false”
- I bound an event handler to the event (valueChanged) = “handleChange()”
- I set the initial value of “endDate” to null
- I load data and the data sets the “endDate” to null still
Expected Results:
- (valueChanged) should run once
- date inside component is empty
Actual Results:
- (valueChanged) runs twice
- date inside component is empty
Notes:
- Since the initial value is null and the loadData() sets the value to null again I would not expect the (valueChange()) event to fire
