question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't reset form input with selectMode 'range' using formcontrol reset

See original GitHub issue

When 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:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
DanielYKPancommented, Mar 22, 2018

@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.

1reaction
DanielYKPancommented, Mar 21, 2018

Please use StackBlitz to show the issue.

I would close this until there is a demo to show the issue.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found