Hello, excuse me for my English but I have translated online. in my form I set
DateTime Picker config format: '% d-% m-% Y ' minDate: new date(). increment (' houre, 48)
I wish only for the Friday, Saturday, Sunday, the date would move to 68 hours while Monday, Tuesday, Wednesday, Thursday 48 hours
grazie mille
Hi serpe76,
I'm not sure I understand the logic :-( What are you trying to do here?
Bob
thanks for the reply, what I want to do is: Monday, Tuesday, Wednesday, Thursday, move the date 48 hours
and only on Friday to move the date of 68 hours, I hope I was clear, thanks
-------
grazie per la risposta, quello che voglio fare è: lunedi, martedi, mercoledi, giovedi, spostare la data di 48 ore
e solo il il venerdi spostare la data di 68 ore , spero di essere stato chiaro, grazie
Hi serpe76,
A bit late answer here, what you need to do is tricky, you need an if statement to check the day and set the config string for the picker, I didn't do it before but I think that the easiest way to do it is to copy the date picket initialization script from the page source then modify the "class" and modify the field class and build a new script using PHP and paste it into a "custom code" action.
Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Yes, this is the key element, but you need the full modified, what's the link to your form ?
Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
You are very kind to give me an answer but I don't link da give you as not on a private network
Please send the link using the "contact us" page!
Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Ciao Max, non posso fornirti di link in quanto il sito è in una Intranet privata😶
Hi serpe,
Sorry, this took sometime!
Please add a new textbox to your form, give it the class "cf_date_picker_mod" and then add a "load JS" action and use the code below:
<?php
if(date("w") == 5){
$inc = 68;
} else {
$inc = 48;
}
?>
window.addEvent('load', function() {
new Picker.Date($$('.cf_date_picker_mod'), {
pickerClass: 'datepicker_dashboard', format: '%d-%m-%Y', allowEmpty: true, useFadeInOut: !Browser.ie, minDate: '<?php echo date('d-m-Y', time() + ($inc * 60 * 60)); ?>'
});
});
Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Con piacere!🙂
if(date("w") == 5 || date("w") == 6 || date("w") == 7){
Saluti,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?