Does anyone know how the embedded date picker works on the (RepeatForm) subform in the mail template?

OK, I’ve given up trying to replicate this feature in my own application and I’m reaching out to anyone who can help me on this. Do I actually need an embedded date picker to be selected from a dialog box? No, not really - but the fact that it can be done and I can’t seeem to figure out how it’s done has turned this into a challenge that I just can’t let go of until I figure it out.

The date picker to choose custom dates for repeating calendar entries looks simple enough. I’ve setup my own in a form for a client-based app and it works perfectly. The wierd thing is, as soon as that same form is presented in the form of a a dialogbox, the $DatePickerDay, $DatePickerMonth & $DatePickerYear no longer update when the embedded picker is selected (the start date value is registering though) Does anyone know if there’s some sort of custom LS Library class this references in the (RepeatForm) as a work-around that I missed somewhere? I’ve reviewed several posts and googled this and see there are others without answers as well so I’m certain whoever answers this post would make many people very happy…

Thanks in advance!!!

Tina

Subject: duplicate post…ignore

Subject: Got it working - finally!

Unfortuneately, I can’t really explain how it’s now working, but it is. Really quirky feature.

During my quest, I discovered a posting on nsftools.com about an undocumented NotesCSEventOwnerDocument Class the (RepeatForm) uses. Fortuneately, this individual had opened up the class code and thought I hit the jackpot. However, bringing this into my own app (and including the Calandar Profile it references) still didn’t get the date picker to work.

As one last ditch effort, I created a new subform and copied all of my design elements into the new subform and…magically, it started working. So now I don’t know if it was a corrupt subform or if was the new class codes that might have recompiled and kicked into gear with the copy - I guess I’ll have to do more investigation but for now, I’m just pleased that I can move on and do my real work now : )

Subject: Does anyone know how the date picker works in the repeating Calendar entry dialog?

maybe I’m missing something but how does the DatePicker in a Repeating meeting differ from the DatePicker on a regular meeting? There are still date fields that use a DatePicker, which is nothing special as it’s just a field proprty. Maybe I don’t fully comprehend your situation.

Subject: RE: Does anyone know how the date picker works in the repeating Calendar entry dialog?

What I meant was the option to set up a meeting to repeat within the Notes calendar. Although the embedded date picker is used elsewhere in the Notes calendar, I used this as my example because it happens to be similar to what I wanted to include in my app - the ability to have a multi-valued date field populate with dates selected from the embedded date picker within a dialog box.

Hope you can help or perhaps come up with a better alternative …Thx.

Subject: RE: Does anyone know how the date picker works in the repeating Calendar entry dialog?

Well if I understand you correctly you want users to pick a start date and and end date using a DatePicker field then have a list of the dates between the 2 chosen dates? If so then do this:

Create a StartDate and an EndDate field and enable the DatePicker for those fields. Create another field called DateRange and make it Text/Computed with this as the formula: @Text(StartDate) + " - " + @Text(EndDate). Next create a multi-value Computed Date/Time field called AllDates with this as the formula: @Explode(@TextToTime(DateRange)).

Subject: RE: Does anyone know how the date picker works in the repeating Calendar entry dialog?

Actually no - didn’t mention needing to generate a range of dates from a start and end date. I need it to allow several random dates chosen by the user to populate into a multi-value date field.

Does this make sense?

Subject: RE: Does anyone know how the date picker works in the repeating Calendar entry dialog?

how about a NewDate field (DatePicker) and an AllDates Computed field with this formula:

tmp := @If(NewDate = “”; “”; AllDates = “”; NewDate; NewDate : AllDates);

@Sort(@TextToTime(@Unique(@Text(tmp))))

After adding to your form compose a doc, choose a date in the NewDate field then hit F9 to refresh, now choose another date, then F9 again, then choose another date, etc. Now you just need to add some code to the NewDate field to force the AllDates field to refresh itself so the user doesn’t need to press F9. You can do this by adding some script to the OnChange or Exiting event and enabling the Run Exiting/OnChange event after value change (3rd tab in field properties). Hope this is what you want.

Subject: RE: Does anyone know how the date picker works in the repeating Calendar entry dialog?

Paul,

Have you tried using the Embedded date picker element when you select “repeat” creating an appointment using custom dates? If you saw this feature you would definitely prefer using this as user than any of the other alternatives. While your suggestion is a functional workaround I just wanted to include a bit of ease of use and wow factor in my application and knowing that it can be done would prefer to figure it out for my purposes. Thanks anyway.

Tina

Subject: RE: Does anyone know how the date picker works in the repeating Calendar entry dialog?

Ah, now I see where you are but I still don’t understand what the actual problem is. I know it’s sometimes difficult to put into words in a way that makes sense to someone else. If you copied the (RepeatForm) to your application did you check all of the code in the form events and JavaScript that resides within the various buttons to make sure they are not doing something you need to take into consideration?

Actually though, I like my suggestion better as it does not require the user to click an addt’l button to add the date to the list. Here’s the code for the OnChange event to refresh the doc so the dates appear without hitting F9 (nothing fancy):

Sub Onchange(Source As Field)

Dim ws As New NotesUIWorkspace

Dim uidoc As NotesUIDocument

Set uidoc = ws.CurrentDocument

Call uidoc.Refresh

Call uidoc.FieldClear("NewDate")

End Sub

Subject: RE: Does anyone know how the date picker works in the repeating Calendar entry dialog?

I didn’t and wouldn’t want to copy the (repeatForm) into my application because there are several other fields and functions on it that don’t apply. All I want is to know how to get the embedded date picker to work in a dialog box (when the same will work in a form). Not sure why that’s hard to understand?

Subject: RE: Does anyone know how the date picker works in the repeating Calendar entry dialog?

as you suspected, there is a bunch of code burried under the CSCalendarEntry script library. Good luck, you’re on your own from here.