jquery validator date

Solutions on MaxInterview for jquery validator date by the best coders in the world

showing results for - "jquery validator date"
David
16 Jan 2017
1        $.validator.addMethod("birth", function (value, element) {
2
3            var ActualDate = new Date();
4            var ActualYear = ActualDate.getFullYear();
5            var ActualMonth = ActualDate.getMonth();
6            var ActualDay = ActualDate.getUTCDate();
7
8            ActualMonth += 1; // O actual month vem sempre com menos um valor do verdadeiro mês
9
10            var Data_Inserida = value.split("-");
11            var year = parseInt(Data_Inserida[0], 10),
12                month = parseInt(Data_Inserida[1], 10),
13                day = parseInt(Data_Inserida[2], 10);
14
15            if (year == ActualYear) {
16
17                if (month == ActualMonth) {
18
19                    if (day > ActualDay) {
20                        return false;
21                    } else
22                        return true
23                } else {
24
25                    if (month > ActualMonth)
26                        return false;
27                    else
28                        return true;
29                }
30            }
31
32            // Máximo de idade neste caso é a idade de reforma, minímo de idade 18
33            if (year > (ActualYear - 66) && year < ActualYear-18) {
34                return true;
35            } else
36                return false;
37
38            return false;
39        })
queries leading to this page
jquery validdatejquery for date validationdate validate jqueryjquery validation for typed value is correct date formatjquery validate date format dd 2fmm 2fyyyyvalidate date value in jqueryjquery validate date rulesdate validation in jqueryjquery validation datenlvalidate type date jquerycheck valid date jqueryhow to date validation in jquerydate format jquery validationjquery format datecheck if date is valid jqueryhow to validate the date in jqueryhow to validate date in jqueryjquery from to date validationjquery date validationhow to check date format is valid jqueryjquery is valid datedate validtaion in jqueryvalidate date in jqueryjqueryvalidation date validationjquery validator datevalidate date format using jqueryjquery validation for datejquery validate for past datedate validation jquery html date format validation jquery validatejquery date validation dd 2fmm 2fyyyyvalidation rule date jqueryvalidate date field jquery validatorfrom date to date validation in jqueryjquery validate rules datejquery validator date formatdate validaton jquery functionjquery validatore datetime jquery date picker validator rulesjquery validate datetimehow to validate from date and to date in jquery datepickerjquery validation datevalidate date jqueryjquery validate date formatvalidate from date and to date in jquerydate jquery validationjquery validator for datedate validation jquery validationjquery form validate for datejquery validate if is datewhat is the best way to validate date in jqueryjquery validate date fieldjquery validation date formatjquery validator date time validationjquery validate datejquery validate date before datesjquery check if date is validjquery chech if date is valid jquery date validation examplevalidate if date is set jqueryformat date jquery validatejquery validate date documentationjquery validator date