How can I prevent the date and time from being selected again once a user has already chosen them in web app? | Community
Skip to main content
Level 4
December 29, 2023
Solved

How can I prevent the date and time from being selected again once a user has already chosen them in web app?

  • December 29, 2023
  • 1 reply
  • 562 views

Hi 
How can I implement a feature to disable or hide specific  time slots for the particular date.

once a user has made a selection, The goal is to prevent others from choosing the same time slot.

 

I've created 'hdate' and 'htime' attributes with string data types to store date and time values, respectively. There are four available time slots for a specific day. If all of these time slots are booked, the corresponding date should be disabled.

My approach is to retrieve the existing date and time values from the database, and then compare any new selections with them. If a match is found, the corresponding date and time should be disabled.

So does anyone have any implementation solution for that!
or any different approach on it !
FYI- Please refer to the attached UI for a better understanding.




This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Marcel_Szimonisz

Hello @vani97 ,

is this adobe campaign question? for web application?

You can create your own table called eg. appointments and simply check availability before rendering the current day and with changing the calendar on the page you can use  AJAX calls  that will query the table with appointments.

You can do both AJAX and web app rendered to user on the same web app where user rendered page you will simply use test activity whether it's ajax request or user request. With ajax request you simply return results that will be parsed by your application.

Marcel

1 reply

Marcel_Szimonisz
Community Advisor
Marcel_SzimoniszCommunity AdvisorAccepted solution
Community Advisor
December 29, 2023

Hello @vani97 ,

is this adobe campaign question? for web application?

You can create your own table called eg. appointments and simply check availability before rendering the current day and with changing the calendar on the page you can use  AJAX calls  that will query the table with appointments.

You can do both AJAX and web app rendered to user on the same web app where user rendered page you will simply use test activity whether it's ajax request or user request. With ajax request you simply return results that will be parsed by your application.

Marcel