Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
155
How to bind date picker value to model in ISO format
posted

Hi,

I have an issue using knockout observables with igDatepicker, I have the below settings/configurations for igDatepicker

enableUTCDates: true

So the value generated in HTML is as below

value="2007-01-12T00:00:00.000Z"

and my ViewModel has value 

_webUi.detailsScreenBinding.viewModel.model.ScheduledShipDate.peek()

"2007-01-12T00:00:00Z"

this is all working as expected. but the problem which I am facing here is, when I change the input value in igdatepicker, the model gets updated as below

Fri Jan 19 2007 19:00:00 GMT-0500 (Eastern Standard Time)

which I don't want. my model also should get updated in ISO format.

Can someone help me to  achieve this

Thanks,

Shwetha

  • 4315
    Offline posted

    Hi, Shwetha.

    The knockout binding handler is always using the date object to pass to the view model. The case you are having will be a new functionality that we need to implement.

    I have prepared a sample for you that I think can help you. Can you please check it and I will wait for you feedback.

    Thank you for using our product!

    Best regards,

    Nikolay Alipiev

    Software Developer