ZF-5909: datePicker prints wrong month names in UK locale

Issue Type: Bug Created: 2009-02-27T10:48:58.000+0000 Last Updated: 2009-03-25T10:16:03.000+0000 Status: Resolved Fix version(s): Reporter: Dmitry Pereslegin (dvp) Assignee: Benjamin Eberlei (beberlei) Tags: - ZendX_JQuery

Related issues: Attachments:


<pre class="highlight">
$date = new Zend_Date('2009-02-01', 'yyyy-MM-dd');
$locale = new Zend_Locale('uk');
$dateFormat = Zend_Locale_Format::getDateFormat($locale); // 'd MMM yyyy'

print $date->get($dateFormat); // prints '1 лют. 2009'

But when I choose that date on the calendar, in the field appears '1 Лют 2009' and date parsing fails

<pre class="highlight">
$locale = new Zend_Locale('uk');
$dateFormat = Zend_Locale_Format::getDateFormat($locale);// 'd MMM yyyy'
$date = $_GET['date']; // '1 Лют 2009'
$filterFromDate = new Zend_Date(date, $dateFormat); // <-- fails


Posted by Thomas Weidner (thomas) on 2009-02-27T12:38:55.000+0000

You can see the reason yourself.

In uk the month 2 with MMM notation is defined as 'лют.' As $_GET returns only 'Лют' which is not the correct notation, the abbreviated month is not detected and therefor the date is invalid.

Posted by Dmitry Pereslegin (dvp) on 2009-02-27T15:16:57.000+0000

But in the localization normally come in JQuery UI (, using the name of the month "Лют", not "лют.". So this is an error jQuery and should write about it to them?

Based on the format of dates in the 'd MMM yyyy' in Zend/Locale/Data/ua.xml (dateFormatLength type="medium") and the code of ZendX_JQuery_View_Helper_DatePicker::resolveZendLocaleToDatePickerFormat, in "ui.datepicker-uk.js" must be abbreviated names from months/monthContext[@type="format"]/monthWidth[@type="abbreviated"], it's right?

Posted by Thomas Weidner (thomas) on 2009-02-28T14:07:34.000+0000

That's right.

MMM is defined as context - format and width - abbreviated. But DatePicker returns the context - standalone which does not conform MMM.

Therefor MMM is not recognised as valid input even if it's in this language only a dot. In other languages the standalone format are complete different words.

Posted by Dmitry Pereslegin (dvp) on 2009-03-01T02:03:50.000+0000

Ticket on jQuery.UI.DatePicker:

Posted by Dmitry Pereslegin (dvp) on 2009-03-24T15:37:54.000+0000

Resolving is scheduled for version 1.8 of jQuery UI (currently stable version is 1.7.1).

So, that had hitherto not possible to fully enjoy the datepicker component on locale-aware or simply multilanguage sites, where needs to use UK-locale

Posted by Benjamin Eberlei (beberlei) on 2009-03-25T10:15:58.000+0000

I mark this as not an issue for the ZFX JQuery, since the bug is jQuery UI DatePicker related.

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.