DatePicker Blues.

Tags: .NET, Office

I'm really surprised at how hard it is to find a good DateTimePicker control that meets all our requirements:

1) Must suppost null dates, like the Due Date datepicker in Outlook tasks.
2) Must be an ActiveX, and supported inside both .NET winforms and Outlook forms.
3) Be generally bug-free and supported.

Doesn't look that hard, does it? But still I've wasted my time on many options, among them:

1) Janus Windows Forms Controls for Microsoft .NET. They have an excellent WinForms package with Outlook-style, controls, but their ActiveX package is old and contains only a grid. Also, their prices are a bit high for this project.
2) DevExpress have a .NET and an ActiveX version of their DatePicker, which is also more than adequate. Again, prices are a problem - buying the suite is expensive, and getting only the XPressEditors component is even worse - over $1200 when all we need is a datepicker?
Addendum: The control does NOT work properly on Outlook forms - the dropdown doesn't.
3) CodeJock have a nice ActiveX Calendar Suite with a datepicker that has good features, but for some reason is implemented as a MonthCalendar display only - no pop-up calendar.
4) NeoComponents have an ActiveX Calendar suite, with a datepicker that crashes and burns when added to an Outlook form.
5) XE Software have a nice little date control too, which unfortunately doesn't allow None as a valid date choice.
6) *New*  TeamScope have an Outlook Developers Library, including lots of libraries for working with Outlook solutions, and a good ActiveX DatePicker too. The problem? The font for the month name is fixed and unchangeable, and isn't set to a Hebrew codepage. How silly is that?

After fiddling with those for a while, I decided to try a different approach - extending the basic DateTimePicker control with the None option, or simply wrapping a good .NET control as an ActiveX.

1) Messing with the .NET DateTimePicker is nasty - it calls the API to use the Windows Common Controls for the picker and the calendar, and adding a button there is really annoying - Many calls to SetParent and SetWindowPos and interfering with the WndProc before I could get my button sync'ed in with the calendar, and it still doesn't look as good as a calendar built for it.

2) Wrapping a .NET control as an ActiveX to be used by Outlook Forms is also problematic, messy and unsupported. Current status, with the help of some good people, can be found on OutlookCode. However, if the Janus suite is chosen for the project (Regardless of the DatePicker) I might have to use this.

Does anyone have a simple, miraculous cure for my problems?

ADDENDUM:
John R. Durant, over at the MSDN Office Developer Center, blogs about the .NET Controls on Outlook Forms problem.

5 Comments

  • Avner Kashtan said

    Thanks for the links, folks. Unfortunately, I need an ActiveX solution, not an ASP.NET control.
    Extending an ASP.NET control is much easier than with WinForms, it seems. All I have to do is override the Render method and add my code above/below. With WinForms, especially when the code isn't actually rendered as a WinForms control but is a wrapper for an unmanaged Common Control, things are a lot hairier.

    Thanks.

  • Teddy Francois said

    I am having the EXACT SAME PROBLEM!!! I am so relieved to find someone who is looking for the same thing and having the same problem.

    Let's keep in touch. If you find a suitable ActiveX datepicker please let me know. As I will do the same.

    Good luck to us both!

    Teddy.

  • rana said

    i created an user form. i used DTPicker1. when i forward this form to third persion, it's giving an error message "to hep prevent malicious code from running, one or more objects in this form were not loaded. for more information, contant you administrator/" and that the place of date picker which i filled first has been lost. thanks for your feedback rana

  • Peter said

    I agree. How is it possible that the default databinding cannot work with the default datepicker control? Anyway I'm also looking for a good control.

Comments have been disabled for this content.