对于datepickerfiled

dateFormat 时间格式 Y-m-d

w星期几    W 一年第多少周

时间的初始化

mydatefield.setValue(

{

year:2013,

month:11,

day:28

      }

)

一、对于星期汉化,查看源码发现

dayNames : [
        "Sunday",
        "Monday",
        "Tuesday",
        "Wednesday",
        "Thursday",
        "Friday",
        "Saturday"
    ]

  两种方法修改:1.源码修改彻底汉化,但是不建议这样使用,如果sencha touch 升级,会导致,变回英文;

        2.在使用处,进行汉化,Ext.Date.dayNames=[“星期一”,“星期二”,“星期三”,……],其实也可以顶一个全局文件

二、月份汉化,查看源码

monthNames : [
        "January",
        "February",
        "March",
        "April",
        "May",
        "June",
        "July",
        "August",
        "September",
        "October",
        "November",
        "December"
    ],

monthNumbers : {
        Jan:0,
        Feb:1,
        Mar:2,
        Apr:3,
        May:4,
        Jun:5,
        Jul:6,
        Aug:7,
        Sep:8,
        Oct:9,
        Nov:10,
        Dec:11
    }

  两种方法修改:1.源码修改彻底汉化,但是不建议这样使用,如果sencha touch 升级,会导致,变回英文;

        2.在使用处,进行汉化,Ext.Date.monthNames=[“一月”,“二月”,“三月”,……];其实也可以顶一个全局文件

                  Ext.Date.monthNumbers=[Jan:1, Feb:2,Mar:3,……];其实也可以顶一个全局文件

这里是所有目前支持的汉化格式

Format  Description                                                                                 Example returned values
------  -----------------------------------------------------------------------        -----------------------
  d  Day of the month, 2 digits with leading zeros                                   01 to 31
  D  A short textual representation of the day of the week                       Mon to Sun
  j  Day of the month without leading zeros                                            1 to 31
  l  A full textual representation of the day of the week                            Sunday to Saturday
  N  ISO-8601 numeric representation of the day of the week                    1 (for Monday) through 7 (for Sunday)
  S  English ordinal suffix for the day of the month, 2 characters                st, nd, rd or th. Works well with j
  w  Numeric representation of the day of the week                                   0 (for Sunday) to 6 (for Saturday)
  z     The day of the year (starting from 0)                                                  0 to 364 (365 in leap years)
  W     ISO-8601 week number of year, weeks starting on Monday                 01 to 53
  F     A full textual representation of a month, such as January or March        January to December
  m     Numeric representation of a month, with leading zeros                        01 to 12
  M     A short textual representation of a month                                           Jan to Dec
  n     Numeric representation of a month, without leading zeros                     1 to 12
  t     Number of days in the given month                                                     28 to 31
  L     Whether it's a leap year                                                             1 if it is a leap year, 0 otherwise.
  o     ISO-8601 year number (identical to (Y), but if the ISO week number (W)    Examples: 1998 or 2004
        belongs to the previous or next year, that year is used instead)
  Y     A full numeric representation of a year, 4 digits                                    Examples: 1999 or 2003
  y     A two digit representation of a year                                                     Examples: 99 or 03
  a     Lowercase Ante meridiem and Post meridiem                                        am or pm
  A     Uppercase Ante meridiem and Post meridiem                                       AM or PM
  g     12-hour format of an hour without leading zeros                                  1 to 12
  G     24-hour format of an hour without leading zeros                                 0 to 23
  h     12-hour format of an hour with leading zeros                                      01 to 12
  H     24-hour format of an hour with leading zeros                                      00 to 23
  i     Minutes, with leading zeros                                                                 00 to 59
  s     Seconds, with leading zeros                                                               00 to 59
  u     Decimal fraction of a second                                                              Examples:
        (minimum 1 digit, arbitrary number of digits allowed)                                   001 (i.e. 0.001s) or
                                                                                                                        100 (i.e. 0.100s) or
                                                                                                                        999 (i.e. 0.999s) or
                                                                                                                        999876543210 (i.e. 0.999876543210s)
  O     Difference to Greenwich time (GMT) in hours and minutes                    Example: +1030
  P     Difference to Greenwich time (GMT) with colon between hours and minutes      Example: -08:00
  T     Timezone abbreviation of the machine running the code                        Examples: EST, MDT, PDT ...
  Z     Timezone offset in seconds (negative if west of UTC, positive if east)      -43200 to 50400
  c     ISO 8601 date
        Notes:                                                                                                Examples:
        1) If unspecified, the month / day defaults to the current month / day,         1991 or
           the time defaults to midnight, while the timezone defaults to the           1992-10 or
           browser's timezone. If a time is specified, it must include both hours     1993-09-20 or
           and minutes. The "T" delimiter, seconds, milliseconds and timezone        1994-08-19T16:20+01:00 or
           are optional.                                                                       1995-07-18T17:21:28-02:00 or
        2) The decimal fraction of a second, if specified, must contain at             1996-06-17T18:22:29.98765+03:00 or
           least 1 digit (there is no limit to the maximum number                          1997-05-16T19:23:30,12345-0400 or
           of digits allowed), and may be delimited by either a '.' or a ','             1998-04-15T20:24:31.2468Z or
        Refer to the examples on the right for the various levels of                    1999-03-14T20:24:32Z or
        date-time granularity which are supported, or see                                2000-02-13T21:25:33
        http://www.w3.org/TR/NOTE-datetime for more info.                                        2001-01-12 22:26:34
  U     Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)                         1193432466 or -2138434463
  MS    Microsoft AJAX serialized dates                                                             \/Date(1238606590509)\/ (i.e. UTC milliseconds since epoch) or
                                                                                              \/Date(1238606590509+0800)\/

sencha Touch 的 DatePickerField等时间的汉化的更多相关文章

  1. sencha touch datepicker/datepickerfield(时间选择控件)扩展

    参考资料: https://market.sencha.com/extensions/datetimepicker 适用于2.4.1版本 uxPickerTime 使用方法参考:datepicker控 ...

  2. sencha touch datepicker/datepickerfield(时间选择控件)扩展(废弃 仅参考)

    参考资料:https://market.sencha.com/extensions/datetimepicker 上面的扩展在2.2有些问题,参考源码重新写了一个 TimePicker: Ext.de ...

  3. sencha touch 问题汇总

    做sencha touch有一段时间了,目前而言,sencha touch在android上问题比较严重,在此对android中sencha touch的问题做一些汇总: 1.内存问题: 打包成安装程 ...

  4. HighCharts/Highstock使用小结,使用汉化及中文帮助文档

       此文档是本人在开发过程图形报表时使用HighCharts所遇到的问题及解决方案 .最后附上有HighCharts中文帮助文档 HighCharts  版本:Highcharts-3.0.1 Hi ...

  5. Sencha Touch+PhoneGap打造超级奶爸之喂养记(一) 源码免费提供

    起源 非常高兴我的宝宝健康平安的出生了.对于初次做奶爸的我,喜悦过后,面临着各中担心,担心宝宝各项指标是否正常.最初几天都是在医院待着,从出生那一天开始,护士妹妹隔一段时间就会来问宝宝的喂奶,大小便, ...

  6. Sencha Touch+PhoneGap打造超级奶爸之喂养记(一) 源码免费提供(转)

    起源 非常高兴我的宝宝健康平安的出生了.对于初次做奶爸的我,喜悦过后,面临着各中担心,担心宝宝各项指标是否正常.最初几天都是在医院待着,从出生那一天开始,护士妹妹隔一段时间就会来问宝宝的喂奶,大小便, ...

  7. 用 Sencha Touch 构建移动 web 应用程序

    Sencha Touch 是一个使用 HTML5.CSS3 和 JavaScript 语言构建的移动 web 应用程序框架,在本文中,学习如何应用您当前的 web 开发技能进行移动 web 开发.下载 ...

  8. 亲手使用Sencha Touch + phonepag开发Web APP随笔 -- 第一个APP

    参考博文: [Phonegap+Sencha Touch] 移动开发1.准备工作 [Phonegap+Sencha Touch] 移动开发2.PhoneGap/Cordova初步使用   经过差不多1 ...

  9. 亲手使用Sencha Touch + phonepag开发Web APP随笔 -- 环境安装篇

    最近因为有个项目需要制作APP,考虑到需要兼容Android和IOS,所以想采用WebAPP的方式来开发.现在是从零开始学习之路,走起-   通过网上博客和论坛,开始安装了一堆软件: 1. Sench ...

随机推荐

  1. 暴力求解——素环数 Prime Ring Problem ,UVa 524

    Description A ring is composed of n (even number) circles as shown in diagram. Put natural numbers i ...

  2. Sentry Server 日志记录分析服务

    原文地址:http://blog.shanbay.com/archives/998 或许你不太会喜欢异常,特别是那些发生后继而沉默在应用日志里那些,你不知道从何开始,因为它们看起来并非那么平易近人,但 ...

  3. JavaScript中的运动数学函数(持续更新)

    经常需要实现JS的动画效果,就会用到如下的一些数学的东西. 二次方运动,从0开始加速: var f=function(t,orgvalue,changevalue,runtime){ var t=t/ ...

  4. 金牌分析师助力 鲁泰A图谋再造一个“鲁泰”?_财经_中国网

    金牌分析师助力 鲁泰A图谋再造一个"鲁泰"?_财经_中国网 金牌分析师助力 鲁泰A图谋再造一个"鲁泰"?

  5. linux 挂载ISO

    首先,将作为源的iso的挂载到系统上. 代码如下: mount -o loop /xxx/xxx.iso /mnt/iso/ 其中/mnt/iso是事先在本地建立的文件夹. 然后将文件iso.repo ...

  6. artTemplate的使用总结

    原生语法 使用原生语法,需要导入template-native.js文件. 在HTML中定义模板,注意模板的位置,不要放到被渲染区域,防止模板丢失. <script id="main_ ...

  7. motan源码分析十:流量切换

    motan提供了流量切换的功能,可以实现把一个group的流量切换到另一个group(一个或多个服务都可以).大家可以使用tomcat部署motan的管理工具,并设置几个组,例如可以参考demo代码: ...

  8. Core OS 层

    Core OS层的底层功能是很多其他技术的构建基础.通常情况下,这些功能不会直接应用于应用程序,而是应用于其他框架.但是,在直接处理安全事务或和某个外设通讯的时候,则必须要应用到该层的框架. Acce ...

  9. 利用NIO建立Socket服务器

    传统的Java 的IO,利用Socket建立服务器,接收客户端连接,一般都是为每一个连接建立一个线程,如果连接数巨大,那么服务器开销也将巨大..NIO的原理,可以参照图:http://new.51ct ...

  10. [CSS3] Using CSS Combinators to Identify Siblings and Descendants in CSS

    CSS combinators allows us to reference the DOM relationship between two or more elements in CSS. < ...