jQWidgets Forums

jQuery UI Widgets Forums Angular Problem Reseting Datetimeinput Range

This topic contains 1 reply, has 2 voices, and was last updated by  Yavor Dashev 3 years, 9 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Problem Reseting Datetimeinput Range #120781

    Dragday
    Participant

    Hello
    I want to reset my date time input , with selectionMode of range.
    However using reactive forms, it doesn’t seem to work propertly when I have a maxDate and minDate.

    If I do:

    
    formControl.reset()
    

    The calendar starts showing NaN

    and if I do

    
    formControl.setValue({})
    

    The disabled dates wont be grayed out with the disabled class the first time you open it.

    Simple way to reproduce it, is by setting the maxDate to “new Date()” , and add a timeout on ngOnInit

    
    
      ngOnInit() {
        setTimeout(
          ()=>{
            this.fc.setValue({})
          }, 500
        )
      }
    

    Errors

    Is this a bug? How do I properly reset a date time input range, with max dates?
    I’ve also tried setRange and val(null,null)

    Problem Reseting Datetimeinput Range #120785

    Yavor Dashev
    Participant

    Hi Dragday,

    Thank you for the detailed information and code snippet!

    I was able to reproduce the exact same scenario and this is definitely a bug and a work item is added for it.

    We will work to fix it as soon as we are able to!

    Please, do not hesitate to contact us if you have any additional questions.

    Best Regards,
    Yavor Dashev
    jQWidgets team
    https://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.