jQWidgets Forums

jQuery UI Widgets Forums Angular Date Range doesnt work with Reactive Forms

This topic contains 1 reply, has 1 voice, and was last updated by  Dragday 3 years, 10 months ago.

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

  • Dragday
    Participant

    Hello, Im trying to implement a date range with the selection mode from jqDateTimeInput
    Without it being set to range, the control updates fine.

    However, setting the selectionMode=”range” , brings two issues
    1) Everything will be set to NaN on the calendar, unless I set the initial value to be a empty array.
    2) The form Control value is not being update after changes the values

    
    <jqxDateTimeInput selectionMode="range" [formControl]="fc"></jqxDateTimeInput>
    <pre>
        {{fc.value | json }}
    </pre>
    

    APP

    
    fc: FormControl = new FormControl([]);
    

    The value keeps it at “[]” even changing the dates.


    Dragday
    Participant

    Got the Solution
    Seems like they expect to the inital value to be a object.
    Initializing the control with {} works

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

You must be logged in to reply to this topic.