Results 1 to 4 of 4

Thread: Datepicker changes value when changing month/year

  1. #1

    Default Answered: Datepicker changes value when changing month/year

    The default datepicker will change its value when you click the "next month" or "previous month" button, or when you click the "choose a month" button and choose your month and year. I would like the date not to change when these actions occur. Is this possible?

    Example: open date picker, click Oct 10th. Click next month, Nov 10th will be highlighted and will be the date when you call getValue(). However, I never explicitly clicked on Nov 10th

  2. Please see this:

    https://fiddle.sencha.com/#fiddle/1ia8

    Once selected, it shows the value. Implemented sencha docs code snippet in fiddle.

  3. #2
    Sencha User
    Join Date
    Sep 2015
    Posts
    44
    Answers
    4

    Default

    Please see this:

    https://fiddle.sencha.com/#fiddle/1ia8

    Once selected, it shows the value. Implemented sencha docs code snippet in fiddle.

  4. #3

    Default

    I see, I was relying on getValue after the calendar was hidden, but I guess I have to rely on the select listener instead. Thanks for the response

  5. #4
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    I haven't been able to recreate this behavior.
    https://fiddle.sencha.com/#fiddle/1ib4

    I click the picker and then I select November. I then select the 'Cancel' button and press the button to get the value.

    UPDATE: Nevermind, I should have refreshed this node before replying to it.

Similar Threads

  1. Select only month/year with datepicker
    By intellix in forum Sencha Touch 2.x: Q&A
    Replies: 1
    Last Post: 30 May 2012, 1:02 PM
  2. DatePicker, show only month and year
    By Sergio Junqueira in forum Sencha Touch 1.x: Q&A
    Replies: 0
    Last Post: 30 Oct 2011, 4:43 AM
  3. datePicker month and year only
    By WBarnie in forum Ext 3.x: Help & Discussion
    Replies: 7
    Last Post: 24 Feb 2011, 3:31 AM
  4. Datepicker set value when year/month changes
    By gxt in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 11 Nov 2008, 6:27 AM

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
  •