Can't reset form input with selectMode 'range' using formcontrol reset
See original GitHub issueWhen I try reseting the form with form.reset() and the ‘selectMode’ is ‘range’ the input value will not reset. The selectMode ‘single’ works.
<label for="dateBestFrom" class="form-label text-nowrap">Date from - to</label> <input name="dateBestFrom" formControlName="dateRange" [owlDateTime]="dateBestFrom" placeholder="YYYY-MM-DD ~ YYYY-MM-DD" [owlDateTimeTrigger]="dateBestFrom" class="form-control" [selectMode]="'range'"> <owl-date-time [firstDayOfWeek]="'1'" [pickerType]="'calendar'" #dateBestFrom></owl-date-time>
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
angular - Cannot reset reactive form that contains a select
So what you need to do, is to reset the form with the value you want, ... If you want to use reset...
Read more >Form - Ant Design
Reset Fill form. Form methods (Class component). We recommend use Form. ... You cannot set value for each form control via value or...
Read more >HTML 5.2: 4.10. Forms - W3C
Radio buttons also use the input element, this time with a type ... Denotes elements that can be affected when a form element...
Read more ><input>: The Input (Form Input) element - HTML
reset, A button that resets the contents of the form to default values. ... The autofocus attribute cannot be used on inputs of...
Read more >4.10.17 Form control infrastructure - HTML Standard - WhatWG
When a listed form-associated element has a form attribute and the ID of any of the elements in the tree changes, then the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@cannibalcow Thanks for reporting the issue. The issue should be fixed in the latest version of the picker
Here is the demo to show the issue been fixed.
Please use StackBlitz to show the issue.
I would close this until there is a demo to show the issue.