#18767: Admin's calendar for datetime fields doesn't show right values with 
russian
and some other locales
-------------------------------+--------------------
     Reporter:  void           |      Owner:  nobody
         Type:  Bug            |     Status:  new
    Component:  contrib.admin  |    Version:  master
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+--------------------
 The problem is within
 
[[https://github.com/django/django/blob/master/django/contrib/admin/static/admin/js/admin/DateTimeShortcuts.js#L220|following
 lines]]:
 {{{
         if (inp.value) {
             var date_parts = inp.value.split('-');
             var year = date_parts[0];
             var month = parseFloat(date_parts[1]);
             if (year.match(/\d\d\d\d/) && month >= 1 && month <= 12) {
                 DateTimeShortcuts.calendars[num].drawDate(month, year);
             }
         }
 }}}
 These lines assume that date format is `YYYY-mm-dd`, which is not true for
 many locales.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18767>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to