I need some sort of calendar that will only allow the selection of a date if it is not already booked (aka a Travelocity type flight calendar that shows available dates/unavailable). I have been looking, but every calendar I have seen won’t take into account days that are already booked.
Basically a user fills out a form making a reservation. That day is then booked. The next user to create a reservation form should see the booked date on his calendar selection area as grayed out, x’d out, red, etc.
Subject: Need Calendar to disallow date selection if already booked
I have a timesheet system generates a pick list of dates. The system removes any dates they’ve already entered. Therefore you could use this approach to give people a picklist of dates vs a calendar.
Therefore your all would be all dates from today forward (maybe to the end of the year). The payused would be the “black out” dates.
all := @Unique(@DbColumn(“”:“NoCache”;“”;“allDates”;2));
Subject: RE: Need Calendar to disallow date selection if already booked
After an all day search, I think I’ve figured out a really great (and EASY) way to do this!! I’m excited.
I have a calendar view that displays “Booked” for every date where there is already a request. I then added an action to the view that is “Select Date”.
I embedded this view in the request form. This means that the calendar shows on the request form with the booked dates displaying a red bold “Booked”. The user can click on a date in the embedded view, and click on the Select Date button(see button code below). The date that the user selected is now populated in the desired field on the uidoc.
Button code:
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim selDT As Variant
Set uidoc = ws.CurrentDocument
Set ccdt=New NotesDateTime(ws.CurrentCalendarDateTime)
'(going to do a lookup to see if there is a document already for ccdt. If so will prompt user to pick a different date)
Call uidoc.FieldSetText(“Dt1”, ccdt.LocalTime)
I’ve never used CurrentCalendarDateTime before, but I love it NOW!