5.7 External form with date picker - calendar not translated
Permalink
Hi folks,
I need to have an external form with a date picker (for the birth date).
The site is in French and German.
Everything works fine (translation done through t('english_string') and the "Translate Site Interface") except the fact the date picker pop-up is not translated (it stays in English) with no way to change it.
I use the following code:
which writes:
What is the best way to pass the language parameter?
Thanks in advance for you lights on it!
Marc
I need to have an external form with a date picker (for the birth date).
The site is in French and German.
Everything works fine (translation done through t('english_string') and the "Translate Site Interface") except the fact the date picker pop-up is not translated (it stays in English) with no way to change it.
I use the following code:
$form = Loader::helper('form'); $dtt = Loader::helper('form/date_time'); //... echo $dtt->date('a_birthdate', "1/1/2000", true);
which writes:
<div> <span class="ccm-input-date-wrapper" id="a_birthdate_dw"> <input id="a_birthdate_pub" class="form-control ccm-input-date hasDatepicker"> <input id="a_birthdate" name="a_birthdate" type="hidden" value="2000-01-01"> </span> </div> <script type="text/javascript"> $(function () { $("#a_birthdate_pub").datepicker({ dateFormat: "d\/m\/yy", altFormat: "yy-mm-dd", altField: "#a_birthdate", changeYear: true, showAnim: 'fadeIn' }).datepicker( "setDate" , new Date(2000, 0, 1) ); });
Viewing 15 lines of 16 lines. View entire code block.
What is the best way to pass the language parameter?
Thanks in advance for you lights on it!
Marc