Need Calendar to disallow date selection if already booked

I need some HELP!

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.

Any thoughts? PLEASE?

Subject: Need Calendar to disallow date selection if already booked

Hello,

You didn’t tell does you’re writing for LN client or for web application?

In LN AFAIK you couldn’t do that, but you can check is selected date available in Exiting event for calendar field and dislpay info if not.

The same you can do in web with JavaScript, or you can write yor own calendar in JS (or modify existing one).

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));

payused := @Unique(@DbColumn(“”:“NoCache”;“”;“pdu”;1)) ;

list := “”;

@For(x:=1;x<=@Elements(all);x:=x+1;

. . found := @False;

. . @For(y:=1;y<=@Elements(payused);y:=y+1;

. . . . found:=@If(found;found;all=payused[y];@True;@False)

. . );

. . list := @Trim(@If(found;“”;all):list)

);

list;

(I added the . . to show indenting - makes it more readable).

If you come up with some way to grey out the dates on a calendar, I’d love to see it. for future reference.

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!