Angular 2/ TypeScript / Wijmo 5/ - wj-input-time error

Posted by: feniksreborn on 10 December 2017, 8:05 pm EST

    • Post Options:
    • Link

    Posted 10 December 2017, 8:05 pm EST

    Hello,

    What is the proper way to use control wj-input-time?

    I try this:

                     <wj-input-time #duration
                                       [(value)]="selectedItem.ProcessingDuration"
                                       [format]="'hh:mm'"
                                       [step]="15"
                                       [isRequired]="false" 
                                       		(valueChanged)="onProcessingDurationChanged(duration,$event)">
                        </wj-input-time>
    
    
        onProcessingDurationChanged(s: wjcInput.InputDate, e: wjcCore.EventArgs) {
            if (s.value)
                this.selectedItem.ProcessingDuration = s.value;
        }
    
    

    But I am getting the error: ** Assertion failed in Wijmo: Date expected.

    Any idea?

    Best regards,

    M

  • Posted 12 December 2017, 9:02 pm EST

    Hi,

    Probably the value assign to the control is null/undefined. That is why the error is occurring. You need to isRequired before assign the value to control. Please refer to the control for the same.

    <wj-input-time #duration
                                       [isRequired]="false" 
                                       [(value)]="selectedItem.ProcessingDuration"
                                       [format]="'hh:mm'"
                                       [step]="15"			(valueChanged)="onProcessingDurationChanged(duration,$event)">
                        </wj-input-time>
    

    ~Manish

  • Posted 30 January 2018, 4:50 am EST

    I have the same problem even I don’t specified any value for value i gives me error

    “An unexpected client error has occurred

    Uncaught ** Assertion failed in Wijmo: Number exp”

    <wj-auto-complete [itemsSource]="shiftList" displayMemberPath="Descr" selectedValue="item.ShiftCode" selectedValuePath="Code"></wj-auto-complete>
                <wj-input-time  
                               format="h:mm tt"
                               min="09:00" max="17:00"
                               step="15">
                </wj-input-time>a
    
  • Posted 1 February 2018, 5:05 pm EST

    Hi,

    We are sorry for the delayed response.

    You need to write step within to get correctly working the control. Please use the following code snippet:

    <wj-input-time [format]="'h:mm tt'"
                      
                      min="09:00" 
                      max="17:00"
                      [step]="10">
                </wj-input-time>
    

    ~Manish

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels