lundi 30 novembre 2020

extjs fieldset checkboxToggle and collapsed is not showing

I've been working on showing fieldset and adding collapsed reservation date in ExtJS which is 6.2.0 version

the problem is that title and checkox is not showing up.

i put checkboxTgoogle : true, and title

and I checked in google console that two of these is in the items correctly

but it's not showing up. I don't know what is the probs of my codes. this is my code.

{
            xtype: 'fieldset',
            id:'reservation',
            checkboxToggle: true,
            title: G11N.getMessage('reservation'), 
            collapsed: true,
            name: 'reservation',
            autoHeight:true,
            layout: 'hbox',
            defaults: { padding: '10 10 10 0'},
            listeners: {
                expand : function(){
                    me.isReservation = true;
                },
                collapse : function(){
                    me.isReservation = false;
                }
            },
            items: [{
                xtype: 'datefield',
                name: 'reservationDate',
                fieldLabel: G11N.getMessage('date'),
                minValue: new Date(),
                labelAlign: 'right',
                labelWidth: 40,
                msgTarget: 'side',
                padding: '0 5 0 5',
                format: 'Y-m-d',
                listeners: {
                    select: function(combo, record, eOpts){
                        var form = me.down('form').getForm();
                        var dateObj = new Date(record);
                        var reservationTime = form.findField('reservationTime');
                        reservationTime.select();
                        if(dateObj.getDate() == new Date().getDate()){
                            reservationTime.setMinValue(new Date());
                        }else{
                            reservationTime.setMinValue('00:00');
                        }
                    }
                }
            }

thank you for reading my write.




Aucun commentaire:

Enregistrer un commentaire