Expand my Community achievements bar.

SOLVED

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

Avatar

Level 4

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.




Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

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