Results 1 to 2 of 2

Thread: Ext.util.Format.dateRenderer always off by 1

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Jun 2012
    Vote Rating

    Default Ext.util.Format.dateRenderer always off by 1

    This is a very simple bug to test: open up a Sencha Touch 2.2 app, then go into Chrome's developer console and type Ext.util.Format.dateRenderer('M d, Y')('2013-08-05')

    The returned string is "Aug 04, 2013" when instead it should be "Aug 05, 2013." Any other date format seems to work properly (e.g. '2013/08/05' or '2013-8-5' or even '2013-08-05 ' with a trailing space). Only dates specified using YYYY-MM-DD are returned off by one. The format string (e.g. 'M d, Y') does not appear to have any impact.

  2. #2
    Sencha - Support Team
    Join Date
    Oct 2011
    Vote Rating


    Thank you for your report.
    This is a known issue. The docs for the date method state that:

    Note that this uses the native Javascript Date.parse() method and is therefore subject to its idiosyncrasies. Most formats assume the local timezone unless specified. One notable exception is 'YYYY-MM-DD' (note the dashes) which is typically interpreted in UTC and can cause date shifting.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts