Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.
  1. #1
    Sencha Premium Member
    Join Date
    Dec 2012
    Location
    Belgium
    Posts
    6
    Vote Rating
    0
    fappels is on a distinguished road

      0  

    Default datepicker setValue(null) issue when oldValue is Date

    datepicker setValue(null) issue when oldValue is Date


    touch 2.4.1

    Cannot update the record in a form containing a datepicker with value from Date to null.

    Fixed it by changing picker/Date.js:

    From

    Code:
    onSlotPick: function() {
            var value = this.getValue(true),
                slot = this.getDaySlot(),
                year = value.getFullYear(),
                month = value.getMonth(),
                days = [],
                daysInMonth, i;
    
    
            if (!value || !Ext.isDate(value) || !slot) {
                return;
            }
    
    
            this.callParent(arguments);
    ...
    To

    Code:
    onSlotPick: function() {
            var value = this.getValue(true),
                slot = this.getDaySlot(),
                days = [],
                year, month, daysInMonth, i;
    
    
            if (!value || !Ext.isDate(value) || !slot) {
                return;
            }
            
            year = value.getFullYear();
            month = value.getMonth();
    
    
            this.callParent(arguments);
    
    ...
    Regards,
    Francis

  2. #2
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    5,457
    Vote Rating
    113
    Gary Schlosberg is just really nice Gary Schlosberg is just really nice Gary Schlosberg is just really nice Gary Schlosberg is just really nice Gary Schlosberg is just really nice

      0  

    Default


    Thanks for the report. Can you please post a test case which reproduces the issue?
    https://fiddle.sencha.com/#home
    Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our human resources manager: fabienne.bell@sencha.com

  3. #3
    Sencha Premium Member
    Join Date
    Dec 2012
    Location
    Belgium
    Posts
    6
    Vote Rating
    0
    fappels is on a distinguished road

      0  

    Default Unable to reproduce on fiddle.

    Unable to reproduce on fiddle.


    I'm unable to reproduce on fiddle.
    This is my fiddle to show what I'm doing.

    https://fiddle.sencha.com/#fiddle/hq5

Thread Participants: 1

Tags for this Thread