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