-
8 Apr 2008 2:06 AM #31
Hello,
Very good work for DatePickerPlus.
I just 2 questions:
- How to pre-select the dates, as if they were clicked ?
- When I am on my form with DatePickerPlus and I click on the dates. If I come back to this page, these same dates are yet clicked. How to display DatePickerPlus without having clicked dates?
Sorry for my very bad english
Thanks
-
8 Apr 2008 2:28 AM #32
Easy, just set them by "selectedDates"
or add themPHP Code:myDatePickerPlus.selectedDates = [
new Date(2008,0,1),
new Date(2008,3,5),
new Date(2008,6,8)
]
But this way visual changes will only happen after you open datepickerplus again...mmhPHP Code:myDatePickerPlus.selectedDates.push(new Date(2008,8,9));
I'm going to add methods for that... next beta coming up ( i need to fix the bug, Richie1985 reported above, first)
Same way: just delete the array
i think i will add another config option that does that automatically for you before showing datepickerplus again or at runtime (as stated above selectedDates-array does not immedialty change the view....gimme some minutes to make this more comfortable.PHP Code:myDatePickerPlus.selectedDates = [];

Extensions:
Ext.ux.DatePickerPlus (Multimonth,Multiselect,...)
Ext.ux.menu.StoreMenu - Ajax Store as menu-item config
Extended Window - Aero Shadows, nested grayscaled modal windows
Ext.MessageBox.promptCombo/promptRadio/promptCheckbox
Ext.ux.plugin.triggerfieldTooltip (for Comboboxes, Datefields...)
Ext.util.MD5
Ext.util.Utf8 (encode/decode)
Ext.util.base64 (encode/decode)
Using:
ExtJS 3.4.1.1/4.2
XPsp3/W7sp1
IE8/9/10
FF 20
Chrome 26
-
8 Apr 2008 4:24 AM #33
Thanks,
it's work for my second question, but for the pre-select date nothing

My code :
Code:<script language="javascript"> Ext.QuickTips.init(); // turn on validation errors beside the field globally Ext.form.Field.prototype.msgTarget = 'under'; var simple = new Ext.FormPanel({ labelWidth: 20, // label settings here cascade unless overridden url:'save-form.php', frame:true, title: 'Gestion des dates pour : <?=addslashes($ol["TitreOffre"])?>', bodyStyle:'padding:5px 5px 0', width: 250, fileUpload : true, defaults: {width: 250}, defaultType: 'textfield', items: [datepickerplusmenu = new Ext.ux.DatePickerPlus ({ usePickerPlus : true, //this will fire the use of datepickerplus instead of datepicker noOfMonth : 1, fieldLabel : 'ddddd', noOfMonthPerRow : 1, multiSelection: true, multiSelectByCTRL:false, markNationalHolidays: false, selectMonthText : 'Cliquez ici pour inverser la sélection', weekName : 'S', selectWeekText : 'Cliquez ici pour sélectionner tous les jours de la semaine', undoText:'Annuler', renderTodayButton :false, renderOkUndoButtons:true, disablePartialUnselect:false, listeners:{'undo':function(){ page('listeOffresSpeciales.php'); }} , handler : function(dp, date){ var allStringDates=[]; //take care of multiselection on/off (on will return an array of dateobjects, false will return one single dateobject) if (Ext.isDate(date)) { allStringDates.push(date.format('Y-m-d')); } else { Ext.each(date,function(c){ allStringDates.push(c.format('Y-m-d')); },this); } simple.getForm().submit({url:'save-dateoffresspeciales.php' , params:{'dates':allStringDates.join('|')},waitMsg:'Enregistrement des informations ...', success:function(form, action,response){ page('listeOffresSpeciales.php?id_rub=<?=$o["IdCategorieOffreSpeciale"]?>'); } }); // Ext.MessageBox.alert('Date(s) Selected', 'You have chosen the following day(s):<br>'+allStringDates.join('<br>')); } }) ] }); datepickerplusmenu.selectedDates = []; datepickerplusmenu.selectedDates.push(new Date(2008,4,7)); simple.render('div_form'); </script>
-
8 Apr 2008 5:39 AM #34
Wooooooooooooo
Thanks for share!!!
-
8 Apr 2008 6:54 AM #35
Updated to Beta 6
Updated to Beta 6
I uploaded another Version.
try
PHP Code:myDatepickerPlus.clearSelectedDates();
and/or
PHP Code:myDatepickerPlus.setSelectedDates(new Date(2008,8,9)); //for single date
myDatepickerPlus.setSelectedDates([
new Date(2008,8,9),
new Date(2008,3,1),
new Date(2008,0,2),
new Date(2008,0,10)
]); // for many dates at once
Extensions:
Ext.ux.DatePickerPlus (Multimonth,Multiselect,...)
Ext.ux.menu.StoreMenu - Ajax Store as menu-item config
Extended Window - Aero Shadows, nested grayscaled modal windows
Ext.MessageBox.promptCombo/promptRadio/promptCheckbox
Ext.ux.plugin.triggerfieldTooltip (for Comboboxes, Datefields...)
Ext.util.MD5
Ext.util.Utf8 (encode/decode)
Ext.util.base64 (encode/decode)
Using:
ExtJS 3.4.1.1/4.2
XPsp3/W7sp1
IE8/9/10
FF 20
Chrome 26
-
8 Apr 2008 7:02 AM #36
Extensions:
Ext.ux.DatePickerPlus (Multimonth,Multiselect,...)
Ext.ux.menu.StoreMenu - Ajax Store as menu-item config
Extended Window - Aero Shadows, nested grayscaled modal windows
Ext.MessageBox.promptCombo/promptRadio/promptCheckbox
Ext.ux.plugin.triggerfieldTooltip (for Comboboxes, Datefields...)
Ext.util.MD5
Ext.util.Utf8 (encode/decode)
Ext.util.base64 (encode/decode)
Using:
ExtJS 3.4.1.1/4.2
XPsp3/W7sp1
IE8/9/10
FF 20
Chrome 26
-
8 Apr 2008 7:26 AM #37
I'm using beta 6 with the afterdateclick event as:
however the value it picks up is previous one not the new selected one - is this the way it should work? how do I get the new selected datePHP Code:listeners:{'afterdateclick':function(){var mydate = this.value; Ext.MessageBox.alert(mydate); }}
Thanks
Sanj
-
8 Apr 2008 7:42 AM #38
Hello,
I'm testing the beta 6 but with : setSelectedDates , I have no date selected.
My code :
thanksCode:<script language="javascript"> Ext.QuickTips.init(); // turn on validation errors beside the field globally Ext.form.Field.prototype.msgTarget = 'under'; var simple = new Ext.FormPanel({ labelWidth: 20, url:'save-form.php', frame:true, title: 'Gestion des dates pour : <?=addslashes($ol["TitreOffre"])?>', bodyStyle:'padding:5px 5px 0', width: 250, fileUpload : true, defaults: {width: 250}, defaultType: 'textfield', items: [datepickerplusmenu = new Ext.ux.DatePickerPlus ({ usePickerPlus : true, //this will fire the use of datepickerplus instead of datepicker noOfMonth : 1, fieldLabel : 'ddddd', noOfMonthPerRow : 1, multiSelection: true, multiSelectByCTRL:false, markNationalHolidays: false, selectMonthText : 'Cliquez ici pour inverser la sélection', weekName : 'S', selectWeekText : 'Cliquez ici pour sélectionner tous les jours de la semaine', undoText:'Annuler', renderTodayButton :false, //weekendText: 'This day seems to be a weekend...:)', renderOkUndoButtons:true, disablePartialUnselect:false, listeners:{'undo':function(){ page('listeOffresSpeciales.php?id_rub=<?=$o["IdCategorieOffreSpeciale"]?>'); }} , handler : function(dp, date){ var allStringDates=[]; if (Ext.isDate(date)) { allStringDates.push(date.format('Y-m-d')); } else { Ext.each(date,function(c){ allStringDates.push(c.format('Y-m-d')); },this); } simple.getForm().submit({url:'save-dateoffresspeciales.php?id=<?=$_GET["id"]?>' , params:{'dates':allStringDates.join('|')},waitMsg:'Enregistrement des informations ...', success:function(form, action,response){ page('listeOffresSpeciales.php?id_rub=<?=$o["IdCategorieOffreSpeciale"]?>'); } }); } }) ] }); //datepickerplusmenu.clearSelectedDates(); simple.render('div_form'); datepickerplusmenu.setSelectedDates(new Date(2008,4,10)); </script>
-
8 Apr 2008 11:24 AM #39
Extensions:
Ext.ux.DatePickerPlus (Multimonth,Multiselect,...)
Ext.ux.menu.StoreMenu - Ajax Store as menu-item config
Extended Window - Aero Shadows, nested grayscaled modal windows
Ext.MessageBox.promptCombo/promptRadio/promptCheckbox
Ext.ux.plugin.triggerfieldTooltip (for Comboboxes, Datefields...)
Ext.util.MD5
Ext.util.Utf8 (encode/decode)
Ext.util.base64 (encode/decode)
Using:
ExtJS 3.4.1.1/4.2
XPsp3/W7sp1
IE8/9/10
FF 20
Chrome 26
-
8 Apr 2008 11:39 AM #40
Extensions:
Ext.ux.DatePickerPlus (Multimonth,Multiselect,...)
Ext.ux.menu.StoreMenu - Ajax Store as menu-item config
Extended Window - Aero Shadows, nested grayscaled modal windows
Ext.MessageBox.promptCombo/promptRadio/promptCheckbox
Ext.ux.plugin.triggerfieldTooltip (for Comboboxes, Datefields...)
Ext.util.MD5
Ext.util.Utf8 (encode/decode)
Ext.util.base64 (encode/decode)
Using:
ExtJS 3.4.1.1/4.2
XPsp3/W7sp1
IE8/9/10
FF 20
Chrome 26


Reply With Quote



. Try current beta 7, please