Tan*_*may -1
以下是执行此操作的 jQuery 方法。
$('input[type="date"]').change(function{
var date = new Date( this.value );
var specificDate = "23 March 2018";
if(date.getDay() == 6 || date.getDay() == 0 || this.value == specificDate) { //Check for Saturday or Sunday
$(this).css("color","red");
}
else {
$(this).css("color","inherit");
}
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2083 次 |
| 最近记录: |