1

I'm developing appointment system with PHP. I want to make manipulation on input date calendar. So if a client wants to create appointment, client will select the desired day/month/year.

When a different client wants to create appointment, selected fields so other day/month/year will be display disabled. How can i do this. Do you have anyone idea?

If you can show simple example, i will be very happy.

Thanks, regards.

4
  • what you mean by When a different client wants to create appointment, selected fields so other day/month/year will be display disabled? Commented Dec 25, 2019 at 10:57
  • Are you saying if someone has already that appointment, others should not be able to select that date? Commented Dec 25, 2019 at 10:58
  • Yes! Absolutely. Can you help me? Commented Dec 25, 2019 at 12:50
  • i will make first time Commented Dec 25, 2019 at 13:05

1 Answer 1

1

you can use out focus or blur method so that you can disable the previous date from selecting. for eg. if client selected date = 25/12/2019

if another client selected the same date then

$('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")
}
})
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.