You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thanks for the clock-timepicker, it's great, it works perfectly
in my nature project, I have to compare times.
-early morning
-late morning
-early afternoon
-late afternoon.
for example it is impossible to have a schedule for the end of the morning before the start of the morning
I programmed it in javascript, if it helps anyone that's great
in the js, I will check that it is the correct time format 00:00 (etape=3).
Then after compare the order of the times if it is ok etape=4, otherwise text associated with the error.
example with attachment
L'horaire du matin doit être inférieur a celui du midi=>The morning schedule must be less than the midday schedule
//start javascript
if (document.getElementById("bp_envoyer_li")){
document.getElementById("bp_envoyer_li").addEventListener("click",function() {bp_envoyer_li();});
}
function bp_envoyer_li(){
etape=3;
if (etape==3){
//format attendu 08:00,20:00
horaires="";
if (document.getElementById("demijournee_deb_matin").value!=""){
if (document.getElementById("demijournee_fin_matin").value!=""){
if (document.getElementById("demijournee_deb_amidi").value!=""){
if (document.getElementById("demijournee_fin_amidi").value!=""){
horaires=document.getElementById("demijournee_deb_matin").value+','+document.getElementById("demijournee_fin_matin").value;
horaires+=','+document.getElementById("demijournee_deb_amidi").value+','+document.getElementById("demijournee_fin_amidi").value;
}
}
}
}
if (horaires!=""){
etape=3.5;
}else{
document.getElementById("bp_secu_text_en").innerHTML='il faut remplir les horaires';
}
}
if (etape==3.5){
var deb_matin=document.getElementById("demijournee_deb_matin").value;
var tab_deb_matin=deb_matin.split(':');
var deb_matin_seconde=parseInt(tab_deb_matin[0])*3600+parseInt(tab_deb_matin[1])*60;
var fin_matin=document.getElementById("demijournee_fin_matin").value;
var tab_fin_matin=fin_matin.split(':');
var fin_matin_seconde=parseInt(tab_fin_matin[0])*3600+parseInt(tab_fin_matin[1])*60;
var deb_amidi=document.getElementById("demijournee_deb_amidi").value;
var tab_deb_amidi=deb_amidi.split(':');
var deb_amidi_seconde=parseInt(tab_deb_amidi[0])*3600+parseInt(tab_deb_amidi[1])*60;
var fin_amidi=document.getElementById("demijournee_fin_amidi").value;
var tab_fin_amidi=fin_amidi.split(':');
var fin_amidi_seconde=parseInt(tab_fin_amidi[0])*3600+parseInt(tab_fin_amidi[1])*60;
if (deb_matin_seconde>fin_matin_seconde){
document.getElementById("bp_secu_text_en").innerHTML="L\'horaire du matin doit être inférieur a celui du midi";
}else{
if (fin_matin_seconde>deb_amidi_seconde){
document.getElementById("bp_secu_text_en").innerHTML="L\'horaire du midi doit être inférieur a celui du début d\'après-midi";
}else{
if (deb_amidi_seconde>fin_amidi_seconde){
document.getElementById("bp_secu_text_en").innerHTML="L\'horaire du début d\'après-midi doit être inférieur a celui du soir";
}else{
etape=4;
}
}
}
}
if (etape==4){
document.forms["horaires"].submit();
}
//end javascript
The text was updated successfully, but these errors were encountered:
Hello everyone,
thanks for the clock-timepicker, it's great, it works perfectly
in my nature project, I have to compare times.
-early morning
-late morning
-early afternoon
-late afternoon.
for example it is impossible to have a schedule for the end of the morning before the start of the morning
I programmed it in javascript, if it helps anyone that's great
in the js, I will check that it is the correct time format 00:00 (etape=3).
Then after compare the order of the times if it is ok etape=4, otherwise text associated with the error.
example with attachment
L'horaire du matin doit être inférieur a celui du midi=>The morning schedule must be less than the midday schedule
Thank you for this project
Sincerely
david LECUYER
//start html
//end html
//start javascript
if (document.getElementById("bp_envoyer_li")){
document.getElementById("bp_envoyer_li").addEventListener("click",function() {bp_envoyer_li();});
}
function bp_envoyer_li(){
etape=3;
if (etape==3){
//format attendu 08:00,20:00
horaires="";
}
if (etape==3.5){
var deb_matin=document.getElementById("demijournee_deb_matin").value;
var tab_deb_matin=deb_matin.split(':');
var deb_matin_seconde=parseInt(tab_deb_matin[0])*3600+parseInt(tab_deb_matin[1])*60;
}
if (etape==4){
document.forms["horaires"].submit();
}
//end javascript
The text was updated successfully, but these errors were encountered: