Calendar Popup Suggestions

Calendar Popup Suggestions

Old forum URL: forums.lhotka.net/forums/t/128.aspx


Steven posted on Wednesday, May 17, 2006

 

I would like to provide a popup calendar capability for date fields on detail forms. I was wondering if anyone had suggestions for this.

 

I want to provide both a free form textbox and popup calendar selection.  I remember seeing some discussion concerning null values and smartdate fields so I was wondering if anyone has a good solution to this.

 

thanks

JCardina replied on Wednesday, May 17, 2006

We use the infragistics UI framework and it's UltraDateTimeEditor control supports nullable dates.

Effectively if a user want's to clear a date they just highlight the contents of the date in non-popped up mode and press delete.

So basically what you need is a date time editor that supports nullable dates. 

If you're looking for free or ideas on making one there are several on CodeProject:

http://www.codeproject.com/cs/miscctrl/#Date%2FTime+controls

 

Steven replied on Wednesday, May 17, 2006

I have the infragistics library so I tried the UltraDatetimeEditor.

It seemed good until I tried to allow for free form entry to do things like enter +3 to set the date three days in advance.  Dosent the SmartDate in CSLA allow for this type of data entry so the date control would also?

Steven replied on Friday, May 26, 2006

I didn’t like the Infragistics UltraDateTimeEditor because it does not allow for free form entry.  However, I was able to use two other Infragistics controls to create a popup calendar field that is entirely like a normal textbox except for the button that allows for the calendar popup (really popdown).

 

I used the infragistics UltraTextEditor because that control makes it easy to add buttons inside the textbox either on the left or right side.  So I added one button to the right side.

 

Then I add a UltraPopupControlContainer control.  This control allows you to popup any other control on the form which is not visible until the popup occurs.  So the contained control is a standard windows forms MonthCalendar control.

 

The net result is a standard text entry experience that will allows users to enter things like +, +1 (tomorrow), +2 (2 days from now), tom, y (yesteday), -1 (yesterday).  Etc.

 

Once again this will still require some infragistics components but if anyone is interested I can post the code that glues it together.

JHurrell replied on Wednesday, May 17, 2006

I've been providing a textbox in which the user can manually enter a date and a calendar control that allows the selection of a date. Using the combination allows us to let keyboard users to quickly enter and clear (null) dates while providing the calendar lets GUI-dependent folks select dates graphically.

I like this calendar: http://www.dynarch.com/projects/calendar/. One of the things it supports is updating another control (textbox) with the selected date.

- John


Copyright (c) Marimer LLC