如何在 PHP 和 JQuery 中进行操作输入类型日期
How to make manipulation input type date in PHP and JQuery
我正在使用 PHP 开发预约系统。我想对输入日期日历进行操作。
因此,如果客户想要创建约会,客户将 select 所需的 day/month/year.
当不同的客户想要创建约会时,select编辑了字段,因此其他 day/month/year 将被禁用。我怎样才能做到这一点。你有什么想法吗?
如果你能展示简单的例子,我会很高兴。
谢谢,问候。
您可以使用out focus 或blur 方法,这样您就可以禁止选择上一个日期。
例如。
如果客户选择日期 = 25/12/2019
如果另一个客户选择了相同的日期则
$('input').blur(function(){
if($('client_2_selected_date').val() == client_1_selected_date){
alert("date matched please select another date");
$('client_2_selected_date').val("")
}
else{
alert("different date")
}
})
我正在使用 PHP 开发预约系统。我想对输入日期日历进行操作。 因此,如果客户想要创建约会,客户将 select 所需的 day/month/year.
当不同的客户想要创建约会时,select编辑了字段,因此其他 day/month/year 将被禁用。我怎样才能做到这一点。你有什么想法吗?
如果你能展示简单的例子,我会很高兴。
谢谢,问候。
您可以使用out focus 或blur 方法,这样您就可以禁止选择上一个日期。 例如。 如果客户选择日期 = 25/12/2019
如果另一个客户选择了相同的日期则
$('input').blur(function(){
if($('client_2_selected_date').val() == client_1_selected_date){
alert("date matched please select another date");
$('client_2_selected_date').val("")
}
else{
alert("different date")
}
})