We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Knockout binding ReadOnly, Disable ejDatePicker

Hi, i am using knockoutjs, bootstrap and i am trying to define as disable or readonly the ejDatePicker based on value from other view field.

On regular inputs using standard knockout bindings works fine [user input is blocked] but when using ejDatePicker knockout custom binding ejDatePicker is still active.

Normal Input:
<input type="text" class="form-control" data-bind="value: VALOR, disable: SOLOLECUTURA() == true"/>

ejDatePicker Input:
<input type="text" class="form-control" readonly="true" data-bind="ejDatePicker: { value: VALOR, enableStrictMode: true, dateFormat: 'yyyy-MM-dd' }"/>

thanks for any advice

1 Reply

SN Sasikala Nagarajan Syncfusion Team September 3, 2014 03:59 AM UTC

Hi Hostilio

Thanks for using Syncfusion Products.

 We have analyzed the reported scenario in DatePicker knockout. We can achieve your requirement using “disable” method of our DatePicker control. We have prepared the sample based on your requirement. Please find the sample from below location.

 http://www.syncfusion.com/downloads/support/directtrac/general/datepicker_knockout-1155066.zip

 In this given sample, we have stored some date value in local variable disabled_dates. DatePicker control will get disabled, after entering the any one of the specified date value in variable disabled_dates and focus out from the text box.

Also, we need to clarify that whether the given sample meets your requirement or we misunderstood, if so could please provide more details about the requirement and it will be easy for us to provide the exact solution.

Please let us know if you need any further assistance.

Regards,

Sasikala Nagarajan


Loader.
Live Chat Icon For mobile
Up arrow icon