开发者

Unix Timestamp in Sencha Touch DatePickerField

I am trying to use a Unix Timestamp value as the default value for a DatePickerField in Sencha Touch. Here's the code I'm using for the form:

var profileForm = new Ext.form.FormPanel({
    title: 'Profile',
    standardSubmit : false,
    items: [{
       开发者_如何学运维 xtype: 'fieldset',
        title: '',
        instructions: 'Edit your profile above',
        defaults: { labelAlign: 'left', labelWidth: '40%' },
        items: [{ xtype: 'datepickerfield', name: 'dob', label: 'DoB', value: user.dob }]
    }]
});

I've tried adding dataType: 'time' to the declaration, but without success. Any thoughts on how this can be achieved without creating a custom Date class to handle timestamps?


You could have used custom component see this thread on Sencha forum since standard component doesn't work for time. Or a date-time picker from this thread.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜