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.
Unfortunately, activation email could not send to your email. Please try again.

Control Error Class

Thread ID:

Created:

Updated:

Platform:

Replies:

119589 Jul 10,2015 12:50 PM Jul 15,2015 11:45 PM JavaScript 5
loading
Tags: ejDatePicker
Hostilio
Asked On July 10, 2015 12:50 PM

Hello, I have the following
HTML:
<input id="fechaInicio" class="form-control" data-bind="ejDatePicker: { value: fechaInicio, enableStrictMode: true, locale: 'es-EC', buttonText: 'Hoy', select: onSelectedInicio }"/>
JS;
self.fechaInicio = ko.observable(moment().format('DD/MM/YYYY')).extend({ validatable: true });

Inspection the HTML code once i put focus on the ejDatePicker and it lose the focus the control adds <span class="e-datewidget e-widget e-error" aria-invalid="true"> showing error but i'm selecting the date from the selector and there is no error.

It's there a way to disable this, since i'm handilng errors with bootstrap and ko validation so i do not want that the ejDatePicker add error class to himself. 
And on the other hand if i can't disable wich is the error since it's a correct date selected.



Harikrishnan P [Syncfusion]
Replied On July 13, 2015 08:41 AM

Hi Hostilio,

Sorry about the inconvenience caused.

If “enableStrictMode” property is set to true, then DatePicker validates the date and adds an error class to notify that a wrong date is present in the DatePicker. If this property is disabled, then we cannot specify a wrong value. DatePicker validates the date and changes the date to a valid date. But, this behavior will not work in our version 13.1 and before in Angular mode. DatePicker will add the error class, even when there is a valid date. We have fixed this issue (“DatePicker not works properly in Angular mode”) and it is included in our latest version 13.2.0.29. Our latest version is available for download under the following link

http://www.syncfusion.com/forums/119549/essential-studio-2015-volume-2-final-release-v13-2-0-29-available-for-download

Please upgrade to our latest version then DatePicker will work properly in Angular mode.

Query : i'm handilng errors with bootstrap and ko validation so i do not want that the ejDatePicker add error class to himself. 

If you don’t want DatePicker to validate itself means, set the property “enableStrictMode” to true. Now, DatePicker will allow the user to enter wrong dates but adds an error class. You can hide the red color border by applying the below style.

[CSS]

    <style>

        .e-datewidget.e-error .e-in-wrap {

            border-color:#bbbcbb;

        }

    </style>



Please let us know if you have further queries.

Regards,
HariKrishnan

Hostilio
Replied On July 13, 2015 05:08 PM

You mention that it's fixed in angular mode, but and in knockoutjs?

Harikrishnan P [Syncfusion]
Replied On July 14, 2015 05:25 AM

Hi Hostilio,
 
The reported problem is applicable in both Angular and KnockOut support and the issue is fixed in both the scenario. So please upgrade to our latest version 13.2.0.29 and DatePicker will work properly.
 
Please let us know if you have further queries.
 
Regards,
HariKrishnan

Hostilio
Replied On July 15, 2015 03:26 PM

Thanks

Harikrishnan P [Syncfusion]
Replied On July 15, 2015 11:45 PM

Hi Hostilio,
 
Thanks for your update.
 
Please get back to us if you need any other assistance.
 
Regards,
HariKrishnan P

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;