Task #0002089: Saisie Date : accepté uniquement l'année

This commit is contained in:
sparkyx 2021-11-12 13:31:27 +01:00
parent 02aee1caa8
commit 16c16ad905

View file

@ -345,6 +345,12 @@ function format_date(p_object)
p_object.value=p_object.value.replace(/\//g,'.');
p_object.value=p_object.value.replace(/-/g,'.');
p_object.value=p_object.value.replace(/ /g,'.');
p_object.value=p_object.value.replace(/\.\./g,'.');
var tmp_value = p_object.value;
a_split=tmp_value.split('.');
if (a_split[2] && a_split[2].match(/[0-9]{2}/)) {
p_object.value=a_split[0]+"."+a_split[1]+"."+"20"+a_split[2];
}
}
/**
*@brief check if the object is hidden or show and perform the opposite,