2
In those two of mine Alert I have two dates, the first date is the date that is taken from my devexpress dateedit date control. The second I created a variable and concatenei with get date, Month and year.
I’m having trouble comparing the one I granted with the date of control because they are in different formats. How to format the date in Javascript to compare with that first image date?
My code:
function ValidaData(controleDataInicio, controleDataFinal) {
var date = new Date();
date = (date.getDate() + '/' + (date.getMonth() + 1) + '/' + date.getFullYear() + ' 00:00:00');
if (controleDataInicio.GetDate() < date) {
alert(RetornaInternacionalizacao('AlertaData2'));
controleDataInicio.SetValue(null);
}
}