You are viewing limited content. For full access, please sign in.

Question

Question

When using Google Translate in Forms 10.1, the date picker translates numerical dates into text form and causes an error.

asked on April 20, 2017

Hello,

 

I have a user who utilizes Google Translate in their forms. When they translate a form for example to Spanish, the forms translates fine but when they go to select a date, Google translate for some reason translates the actual date numbers to words and when you try to select a date, you get an error of NaN/NaN/NaN and that it is an invalid date value.

 

I have tested and confirmed that if I add "notranslate" to the following location in the HTML

 

<div id="ui-datepicker-div" class="notranslate ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all" style="position: absolute; display: none; left: 991.333px; top: 2503.92px; z-index: 1;">

The date picker does not translate and I don't see the issue happen. This happens in multiple browsers as an FYI.

I am also providing some screen shots of what the date picker field looks like when it portrays the abnormal behavior and what the error looks like.

 

Does Laserfiche have any idea on why this would happen or what could be done to prevent this?

 

Thanks!

 

 

Datepicker being translated.jpg
Date Field after selecting a date.jpg
0 0

Replies

replied on April 20, 2017

The date picker uses Jquery datepicker library and it's not compatible with Google Translate, see https://bugs.jqueryui.com/ticket/8266

The workaround is to set notranslate on date picker by adding the following in custom script:

$(function() {
    $('.ui-datepicker').addClass('notranslate');
});

And if you need date picker to be localized, you can use date picker localization referring to https://jqueryui.com/datepicker/#localization

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.