mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 08:13:21 +00:00
Tweak(esx_identity): Change DOB format to dd/mm/yyyy
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
<div style="color: rgb(46, 187, 205);font-size: 12px; font-family: 'Gill Sans', sans-serif";>Last Name</div>
|
<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>
|
<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>
|
<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>
|
<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>
|
<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>
|
<center>
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
myDOB.style.color = 'black';
|
myDOB.style.color = 'black';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var dateInput = [month, day, year].join('/');
|
var dateInput = [day, month, year].join('/');
|
||||||
|
|
||||||
var regExp = /^(\d{1,2})(\/|-)(\d{1,2})(\/|-)(\d{4})$/;
|
var regExp = /^(\d{1,2})(\/|-)(\d{1,2})(\/|-)(\d{4})$/;
|
||||||
var dateArray = dateInput.match(regExp);
|
var dateArray = dateInput.match(regExp);
|
||||||
|
|||||||
@@ -444,7 +444,7 @@ end
|
|||||||
|
|
||||||
function checkDate(str)
|
function checkDate(str)
|
||||||
if string.match(str, '(%d%d)/(%d%d)/(%d%d%d%d)') ~= nil then
|
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)
|
m = tonumber(m)
|
||||||
d = tonumber(d)
|
d = tonumber(d)
|
||||||
y = tonumber(y)
|
y = tonumber(y)
|
||||||
|
|||||||
Reference in New Issue
Block a user