Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Apr 2013
    Location
    Oregon
    Posts
    2
    Vote Rating
    0
    jmorris is on a distinguished road

      0  

    Default GXT 3.0.X DatePicker not propertly displaying min / max range when month is changed

    GXT 3.0.X DatePicker not propertly displaying min / max range when month is changed


    When setting a min or max date on the DatePicker the date range is initially shown correctly with the disabled date cells. Changing months back and forth leaves everything disabled however.

    Code:
        public void onModuleLoad ()
        {
            Date today = new Date();
    
            Date min = new Date();
            min.setDate(today.getDate() - 1);
    
            Date max = new Date();
            max.setDate(today.getDate() + 1);
    
            DatePicker dp = new DatePicker();
            dp.setMinDate(min);
            dp.setMaxDate(max);
            dp.setValue(today);
    
    
            RootPanel.get().add(dp);
        }

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,731
    Vote Rating
    90
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    3.0.x is slightly vague - that leaves 6 possible options for versions, or are you saying it is broken in all 3.0.0-3.0.4?

  3. #3
    Sencha User
    Join Date
    Apr 2013
    Location
    Oregon
    Posts
    2
    Vote Rating
    0
    jmorris is on a distinguished road

      0  

    Default


    Version 3.0.1 had the issue but it seems to have been fixed with version 3.0.4.

  4. #4
    Sencha User
    Join Date
    Jun 2013
    Posts
    7
    Vote Rating
    0
    bawan is on a distinguished road

      0  

    Default


    it can be fixed by changing this function in the DatePicker

    Code:
    private void setCellStyle(Element cell, Date d, long sel, long min, long max) {
            long t = d.getTime();
    
            DateWrapper w = new DateWrapper(d);
            int year = w.getFullYear();
            int month = w.getMonth();
            int day = w.getDate();
    
            String dd = year + "," + month + "," + day;
    
            cell.getFirstChildElement().setPropertyString("dateValue", dd);
    
            appearance.onUpdateDateStyle(cell, DateState.TODAY, t == today);
            appearance.onUpdateDateStyle(cell, DateState.SELECTED, t == sel);
    
            if (t > max || t < min) {
                appearance.onUpdateDateStyle(cell, DateState.DISABLED, true);
                if (t > max) {
                    cell.setTitle(messages.maxText());
                } else {
                    cell.setTitle(messages.minText());
                }
            } else {
                appearance.onUpdateDateStyle(cell, DateState.DISABLED, false);
                cell.setTitle("");
            }
        }

Thread Participants: 2

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."