FAQ
#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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to django-updates+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Django at Aug 19, 2012 at 7:15 pm
    #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 | Resolution:
          Keywords: | Triage Stage: Unreviewed
         Has patch: 1 | Needs documentation: 0
       Needs tests: 0 | Patch needs improvement: 0
    Easy pickings: 0 | UI/UX: 0
    -------------------------------+--------------------------------------
    Changes (by void):

      * needs_better_patch: => 0
      * has_patch: 0 => 1
      * needs_tests: => 0
      * needs_docs: => 0


    Comment:

      Pull request: [https://github.com/django/django/pull/294]

    --
    Ticket URL: <https://code.djangoproject.com/ticket/18767#comment:1>
    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 django-updates@googlegroups.com.
    To unsubscribe from this group, send email to django-updates+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Django at Aug 20, 2012 at 1:42 pm
    #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 | Resolution:
          Keywords: | Triage Stage: Unreviewed
         Has patch: 1 | Needs documentation: 0
       Needs tests: 0 | Patch needs improvement: 0
    Easy pickings: 0 | UI/UX: 0
    -------------------------------+--------------------------------------

    Comment (by anonymous):

      I do not have that problem, describe the regional settings that are
      installed on your system.

    --
    Ticket URL: <https://code.djangoproject.com/ticket/18767#comment:2>
    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 django-updates@googlegroups.com.
    To unsubscribe from this group, send email to django-updates+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Django at Aug 20, 2012 at 2:57 pm
    #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 | Resolution:
          Keywords: | Triage Stage: Unreviewed
         Has patch: 1 | Needs documentation: 0
       Needs tests: 0 | Patch needs improvement: 0
    Easy pickings: 0 | UI/UX: 0
    -------------------------------+--------------------------------------

    Comment (by void):

      I believe it's enough to have `LANGUAGE_CODE = 'ru-ru'` in the
      `settings.py`

    --
    Ticket URL: <https://code.djangoproject.com/ticket/18767#comment:3>
    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 django-updates@googlegroups.com.
    To unsubscribe from this group, send email to django-updates+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Django at Aug 28, 2012 at 9:11 pm
    #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 | Resolution:
          Keywords: | Triage Stage: Unreviewed
         Has patch: 1 | Needs documentation: 0
       Needs tests: 0 | Patch needs improvement: 0
    Easy pickings: 0 | UI/UX: 0
    -------------------------------+--------------------------------------
    Changes (by apollo13):

      * cc: apollo13 (added)


    Comment:

      Please describe what you see (probably with a screenshot) and what's wrong
      there, putting 'ru-ru' as LANGUAGE_CODE doesn't seem to break anything for
      me…

    --
    Ticket URL: <https://code.djangoproject.com/ticket/18767#comment:4>
    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 django-updates@googlegroups.com.
    To unsubscribe from this group, send email to django-updates+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Django at Aug 28, 2012 at 9:21 pm
    #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 | Resolution:
          Keywords: | Triage Stage: Unreviewed
         Has patch: 1 | Needs documentation: 0
       Needs tests: 0 | Patch needs improvement: 0
    Easy pickings: 0 | UI/UX: 0
    -------------------------------+--------------------------------------

    Comment (by anonymous):

      Ok, maybe I was not so clear in the description of this ticket.
      Let's make django model with `DateTimeField` and register it with django
      admin. You'll see something like this:
      [http://dl.dropbox.com/u/302516/Screenshots/usualform.png]. Date is in
      format `01.02.1986`, which means it's 1st of February of 1986.
      Then click on the calendar icon and we'll see calendar popup:
      [http://dl.dropbox.com/u/302516/Screenshots/r.png]. But the popup is
      rendered for August 2012 (as you may see in the title: `Август 2012`). If
      I'd switch my `LANGUAGE_CODE` to `'en-us'`, I see that calendar popup
      renders correct month:
      [http://dl.dropbox.com/u/302516/Screenshots/correct.png].

    --
    Ticket URL: <https://code.djangoproject.com/ticket/18767#comment:5>
    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 django-updates@googlegroups.com.
    To unsubscribe from this group, send email to django-updates+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Django at Sep 8, 2012 at 1:50 pm
    #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 | Resolution:
          Keywords: | Triage Stage: Accepted
         Has patch: 1 | Needs documentation: 0
       Needs tests: 0 | Patch needs improvement: 0
    Easy pickings: 0 | UI/UX: 0
    -------------------------------+------------------------------------
    Changes (by tswicegood):

      * stage: Unreviewed => Accepted


    Comment:

      I was able to reproduce this.

      The issue is that the calendar should display for the month/year of the
      date that is set. Steps to reproduce:

      * Set calendar date to February 1, 2000 (Russian date is 01.02.2000)
      * Click the calendar icon
      * Excepted behavior: Calendar is set to February 2000
      * Actual behavior: Calendar is set to whatever it last was

    --
    Ticket URL: <https://code.djangoproject.com/ticket/18767#comment:6>
    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 django-updates@googlegroups.com.
    To unsubscribe from this group, send email to django-updates+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Django at Mar 1, 2014 at 12:39 pm
    #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 | Resolution:
          Keywords: | Triage Stage: Accepted
         Has patch: 1 | Needs documentation: 0
       Needs tests: 0 | Patch needs improvement: 1
    Easy pickings: 0 | UI/UX: 0
    -------------------------------+------------------------------------
    Changes (by timo):

      * needs_better_patch: 0 => 1


    Comment:

      Patch no longer applies cleanly.

    --
    Ticket URL: <https://code.djangoproject.com/ticket/18767#comment:7>
    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 unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscribe@googlegroups.com.
    To post to this group, send email to django-updates@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/062.4cbe009f864b612e3c6b7d1cca618703%40djangoproject.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Django at Apr 15, 2014 at 2:48 pm
    #18767: Admin's calendar for datetime fields doesn't show right values with russian
    and some other locales
    -------------------------------+------------------------------------
          Reporter: void | Owner: maxocub
              Type: Bug | Status: assigned
         Component: contrib.admin | Version: master
          Severity: Normal | Resolution:
          Keywords: | Triage Stage: Accepted
         Has patch: 1 | Needs documentation: 0
       Needs tests: 0 | Patch needs improvement: 1
    Easy pickings: 0 | UI/UX: 0
    -------------------------------+------------------------------------
    Changes (by maxocub):

      * status: new => assigned
      * owner: nobody => maxocub


    --
    Ticket URL: <https://code.djangoproject.com/ticket/18767#comment:8>
    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 unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscribe@googlegroups.com.
    To post to this group, send email to django-updates@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/062.56b7aa86fd5adda5824956829d8d6a4d%40djangoproject.com.
    For more options, visit https://groups.google.com/d/optout.
  • Django at Apr 15, 2014 at 7:49 pm
    #18767: Admin's calendar for datetime fields doesn't show right values with russian
    and some other locales
    -------------------------------+------------------------------------
          Reporter: void | Owner: maxocub
              Type: Bug | Status: assigned
         Component: contrib.admin | Version: master
          Severity: Normal | Resolution:
          Keywords: | Triage Stage: Accepted
         Has patch: 1 | Needs documentation: 0
       Needs tests: 0 | Patch needs improvement: 1
    Easy pickings: 0 | UI/UX: 0
    -------------------------------+------------------------------------

    Comment (by maxocub):

      My PR: https://github.com/django/django/pull/2560

    --
    Ticket URL: <https://code.djangoproject.com/ticket/18767#comment:9>
    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 unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscribe@googlegroups.com.
    To post to this group, send email to django-updates@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/062.21a23361aacc27702184882f192da001%40djangoproject.com.
    For more options, visit https://groups.google.com/d/optout.
  • Django at Apr 15, 2014 at 7:49 pm
    #18767: Admin's calendar for datetime fields doesn't show right values with russian
    and some other locales
    -------------------------------+------------------------------------
          Reporter: void | Owner: maxocub
              Type: Bug | Status: assigned
         Component: contrib.admin | Version: master
          Severity: Normal | Resolution:
          Keywords: | Triage Stage: Accepted
         Has patch: 1 | Needs documentation: 0
       Needs tests: 1 | Patch needs improvement: 1
    Easy pickings: 0 | UI/UX: 0
    -------------------------------+------------------------------------
    Changes (by maxocub):

      * needs_tests: 0 => 1


    --
    Ticket URL: <https://code.djangoproject.com/ticket/18767#comment:10>
    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 unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscribe@googlegroups.com.
    To post to this group, send email to django-updates@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/062.446b4bcc639d50fba352f36ee59a7d44%40djangoproject.com.
    For more options, visit https://groups.google.com/d/optout.
  • Django at Apr 22, 2014 at 2:39 pm
    #18767: Admin's calendar for datetime fields doesn't show right values with russian
    and some other locales
    -------------------------------+------------------------------------
          Reporter: void | Owner: maxocub
              Type: Bug | Status: assigned
         Component: contrib.admin | Version: master
          Severity: Normal | Resolution:
          Keywords: | Triage Stage: Accepted
         Has patch: 1 | Needs documentation: 0
       Needs tests: 1 | Patch needs improvement: 1
    Easy pickings: 0 | UI/UX: 0
    -------------------------------+------------------------------------

    Comment (by maxocub):

      This [https://github.com/django/django/pull/2560 PR] needs to be reviewed
      please.

    --
    Ticket URL: <https://code.djangoproject.com/ticket/18767#comment:11>
    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 unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscribe@googlegroups.com.
    To post to this group, send email to django-updates@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/062.117a7e22818504718860bb0152b0a3a5%40djangoproject.com.
    For more options, visit https://groups.google.com/d/optout.
  • Django at Apr 23, 2014 at 3:02 am
    #18767: Admin's calendar for datetime fields doesn't show right values with russian
    and some other locales
    -------------------------------+------------------------------------
          Reporter: void | Owner: maxocub
              Type: Bug | Status: assigned
         Component: contrib.admin | Version: master
          Severity: Normal | Resolution:
          Keywords: | Triage Stage: Accepted
         Has patch: 1 | Needs documentation: 0
       Needs tests: 0 | Patch needs improvement: 0
    Easy pickings: 0 | UI/UX: 0
    -------------------------------+------------------------------------
    Changes (by maxocub):

      * needs_better_patch: 1 => 0
      * needs_tests: 1 => 0


    --
    Ticket URL: <https://code.djangoproject.com/ticket/18767#comment:12>
    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 unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscribe@googlegroups.com.
    To post to this group, send email to django-updates@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/062.21f544d0a78aa9efa7aed32b2956c813%40djangoproject.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdjango-updates @
categoriesdjango, python
postedAug 14, '12 at 5:58p
activeApr 23, '14 at 3:02a
posts13
users1
websitedjangoproject.com

1 user in discussion

Django: 13 posts

People

Translate

site design / logo © 2018 Grokbase