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
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
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
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
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
Grazie per avermi risposto l'argomento è difficile per me, mi è stato consigliato di aggiungere questo codice:
Ma non saprei ne dove ne come
-------------------------------
Thank you for having responded to me the argument is hard for me, I was advised to add this code:
But I do not know how and where
<?php
if(date("w")==5){
// 0 = domenica
// 1 = lunedì ...
// 5 = venerdì
echo "68";
} else {
echo "48";
}
echo "\")\";"; \\ chiude lo script
?>
});
Ma non saprei ne dove ne come
-------------------------------
Thank you for having responded to me the argument is hard for me, I was advised to add this code:
<?php
if(date("w")==5){
// 0 = domenica
// 1 = lunedì ...
// 5 = venerdì
echo "68";
} else {
echo "48";
}
echo "\")\";"; \\ chiude lo script
?>
});
But I do not know how and where
Yes, this is the key element, but you need the full modified, what's the link to your form ?
Regards,
Max
Regards,
Max
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
Regards,
Max
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:
Regards,
Max
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
Mio salvatore, Grazie, Grazie, Grazie..... funziona alla perfezione.... ma ti voglio fare arrabbiare e ti chiedo volendo aggiungere anche il sabato e domenica nei controlli ??
Provando con la virgola non funziona...
My savior, Thank you, Thank you, Thank you ..... it works perfectly .... but I want to make you angry and ask you if you add even on Saturdays and Sundays in the controls?
Trying with the comma does not work
Provando con la virgola non funziona...
My savior, Thank you, Thank you, Thank you ..... it works perfectly .... but I want to make you angry and ask you if you add even on Saturdays and Sundays in the controls?
Trying with the comma does not work
<?php
if(date("w") == 5,6,7){
$inc = 68;
} else {
$inc = 48;
}
?>
Con piacere!🙂
Saluti,
Max
if(date("w") == 5 || date("w") == 6 || date("w") == 7){
Saluti,
Max
This topic is locked and no more replies can be posted.