📜  nativescript 日期输入验证 - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:21.056000             🧑  作者: Mango

代码示例1
//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');