Results 1 to 5 of 5

Thread: datepickerfield with value: new Date() does'nt work

  1. #1
    Sencha User
    Join Date
    Nov 2010
    Posts
    17

    Default datepickerfield with value: new Date() does'nt work

    Hi,
    I want to display due_at field according to the bound property from model object. If the property is null, I want to show the field as empty but on click, I wanna show the slide up overlay with today's date, which goes to 1-JAN-1980 each time...
    I define the xtype: 'datepickerfield' without any value: config option
    Code:
    taskFormPanel = new Ext.form.FormPanel(...
    {
        xtype: 'datepickerfield',
                        name: 'due_at',
                        useClearIcon: true,
                        label: 'Due at'
    }
    ...

    Code:
    newTodo = Ext.ModelMgr.create({ id: null, title: '', due_at: null, remind_before: null, todo_id: null, 
                                                completed_at: null, cl_state: 'insert', action: 'new'}, 'Todo');
    taskFormPanel.load(newTodo);
    So basically, I load the formPanel object with the bound property of due_at == null. This shows the due_at datepickerfield as empty.
    However, I'm also looking for a solution.
    My setting of 'datepickerfield' with config option value: new Date()
    doesn't seem to work?!?
    It keeps initializing the slide up overlay with the date 1-JAN-1980. Is this a bug?

  2. #2
    Sencha User
    Join Date
    Nov 2010
    Posts
    17

    Default

    Bump! I still haven't made any progress on that. The datepickerfield 'due_at' is optional so I don't want it to start with some default value. However, I do want the picker to show the current_date?!?

    Any clues, plz!

  3. #3
    Sencha User
    Join Date
    Nov 2011
    Location
    Germany / Darmstadt
    Posts
    64

    Default

    bump

    I have the same problem... My Date field is optional and should be at start emtpy, but set through the datepicker.
    If I use "value: newDate()" inside the "picker", then the newDate() function doesn't work...
    Any suggestions?

    example:
    Code:
    ...
    items: [
    {xtype: 'datepickerfield', label: 'Birthday', value: new Date() }, {xtype: 'datepickerfield', label: 'Birthday',
    picker:{
    value: new Date()
    } }]

  4. #4
    Sencha User
    Join Date
    Nov 2011
    Location
    Germany / Darmstadt
    Posts
    64

    Default any workaround?

    Is there any workaround?

    @sim4life any progress on that problem?

    please can someone help me/us...

  5. #5
    Sencha User
    Join Date
    Oct 2011
    Location
    Germany
    Posts
    146

Similar Threads

  1. [FIXED-466] DatePickerField error on selecting of date
    By mitchellsimoens in forum Sencha Touch 1.x: Bugs
    Replies: 3
    Last Post: 8 Nov 2010, 12:43 PM
  2. Esc button in DatePickerField
    By PSB in forum Sencha Touch 1.x: Discussion
    Replies: 1
    Last Post: 16 Oct 2010, 2:55 AM
  3. Date column in grid doesn't work right
    By pieter333 in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 18 Mar 2009, 6:46 AM
  4. [OPEN] Date.parseDate format code O doesn't work
    By CurtisDuhn in forum Ext 1.x: Bugs
    Replies: 2
    Last Post: 21 Jun 2007, 9:18 AM

Posting Permissions

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