date dd/mm/yyyy
date dd/mm/yyyy
rrzavaleta
Posts: 78Questions: 52Answers: 2
in Editor
Hi allan i need , as I can validate the date in dd / mm / yyyy, in the editor. have any method to accomplish this
This discussion has been closed.
Answers
Hi, I was yesterday in the same problem as you. I think I have found a "solution" that could help you.
I had a date in the string format : 26/01/2015 and I needed the dataTable order It, but It had no a good result, It just ordered by the day.
My idea is to have two parameters, you need the date as you have now, but a numeric date too, I mean in the case 26/01/2015 convert into a String like 20150126. The DataTable will be able to order It in this format correctly.
In this case you are ordering the column by a numericDate that can't be seen and you are showing the date as you wanted to see It.
<td >
<
p class="noVisible">${myObject.numericDate}
<
p> //20150126
${myObject.stringDate} // 26/01/2015
</td>
I hope It could help you, maybe is not a solution but It can help in some cases.
If you are using the prebuilt PHP libraries, I would suggest using the
dateFormat
validator.Allan
hello check a bit and almost got it , I 'm stuck with validation . I hope mepuedas help.
this is what I did (using Editor)
I have not been able to validate
This uses JQuery UI formatting.
This uses PHP
date()
formatting.They are not the same unfortunately.
Allan
Hi,
I had the same problem like rrzavaleta. I needed date in dd-mm-yy format validated.
Here is my solution for everyone who is having the same problem.
My editor field initialisation looks like this :
serverside validation :
This is working for me. I hop it can help someone.
Yves