add type date to input

This commit is contained in:
adri 2018-12-30 17:52:46 +01:00
parent cf68cb8d93
commit 8a3d053816
1 changed files with 12 additions and 9 deletions

View File

@ -1,14 +1,17 @@
$(function() {
$("#allRecord").on("click", ".editUser", function() {
$(this).toggleClass('fa-edit fa-check');
$(this).toggleClass('editUser confirmEditUser');
for(i=0; i<$("td", $(this).parent().parent()).length-1;i++)
{
j= $($("td", $(this).parent().parent())[i]);
j.html('<input '+(j.attr('class')=="pw"?'type="password" \
data-oldpw="'+ltrim(j.html())+'"':'type="text"')+'\
value="'+(j.attr('class')=="pw"?'':ltrim(j.html()))+'" />');
}
$(this).toggleClass('fa-edit fa-check');
$(this).toggleClass('editUser confirmEditUser');
for(i=0; i<$("td", $(this).parent().parent()).length-1;i++)
{
j= $($("td", $(this).parent().parent())[i]);
inputOptions = '';
if(j.attr('class')=="pw")
inputOptions += 'type="password" data-oldpw="'+ltrim(j.html())+'" ';
else if (j.attr('class') == "datene")
inputOptions += 'type="date" '
j.html('<input '+inputOptions+' value="'+(j.attr('class')=="pw"?'':ltrim(j.html()))+'" />');
}
});
$("#allRecord").on("click", ".confirmEditUser", function() {
function callBackVerif(data){