Tweak(esx_identity): Change DOB format to dd/mm/yyyy

This commit is contained in:
Mycroft
2022-05-01 00:38:27 +01:00
parent d8b64ae4ec
commit e2f64fb3ff
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -16,7 +16,7 @@
<div style="color: rgb(46, 187, 205);font-size: 12px; font-family: 'Gill Sans', sans-serif";>Last Name</div>
<input id="lastname" type="text" class="" name="lastname" placeholder="Last Name" onKeyDown="if(this.value.length==16 && event.keyCode!=8)"><br>
<div style="color: rgb(46, 187, 205);font-size: 12px; font-family: 'Gill Sans', sans-serif", sans-serif;>Date of Birth (MM/DD/YYYY)</div>
<input id="dateofbirth" type="text" name="dateofbirth" class="" placeholder="Date of Birth (MM/DD/YYYY)" dateformat="M d y" min="01/01/1900" max="12/31/2020" onfocus="(this.type='date')"><br>
<input id="dateofbirth" type="date" name="dateofbirth" class="" placeholder="Date of Birth (dd/mm/yyy)" min="01/01/1900" max="01/01/2010" onfocus="(this.type='date')"><br>
<div style="color: rgb(46, 187, 205);font-size: 12px; font-family: 'Gill Sans', sans-serif", sans-serif;>Height</div>
<input id="height" type="number" class="" name="height" min="120" max="220" placeholder="Height (cm)" onKeyDown="if(this.value.length==3 && event.keyCode!=8)"><br>
<center>
@@ -84,7 +84,7 @@
myDOB.style.color = 'black';
}
else {
var dateInput = [month, day, year].join('/');
var dateInput = [day, month, year].join('/');
var regExp = /^(\d{1,2})(\/|-)(\d{1,2})(\/|-)(\d{4})$/;
var dateArray = dateInput.match(regExp);
+1 -1
View File
@@ -444,7 +444,7 @@ end
function checkDate(str)
if string.match(str, '(%d%d)/(%d%d)/(%d%d%d%d)') ~= nil then
local m, d, y = string.match(str, '(%d+)/(%d+)/(%d+)')
local d, m, y = string.match(str, '(%d+)/(%d+)/(%d+)')
m = tonumber(m)
d = tonumber(d)
y = tonumber(y)