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
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
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?
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.
Copyright (c) Marimer LLC