nativescript date input validation

The solution for “nativescript date input validation” can be found here. The following code will assist you in solving the problem.

//If you want a date of type yyy-mm-dd
const date_check = /^\d{4}-\d{2}-\d{2}$/;
let check = date.match(data_check)
if(check1 == null)
alert(‘invalid date’);

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

inline scripts encapsulated in