Print Page | Close Window

DateTimePicker Vista BUG

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=14030
Printed Date: 22 November 2024 at 10:31pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: DateTimePicker Vista BUG
Posted By: TomasS
Subject: DateTimePicker Vista BUG
Date Posted: 15 April 2009 at 10:57am

I tried to use two datetimepickers to set a date range. I works great until you set MaxDate on one of them to a passed date (18:th of may 2004 in this case). If you then dropdown, it will move to 1:st of april 2009 for no reason. (1 day of current month maybe?? This is written 15:th of april). Both datetimepickers textbox and the monthview dropdown are changed to this wrong value. Proper behaviour is to keep the current date.

This is a problem on Vista only. On XP it works great.
Setting MaxDate to a date in the future makes it work alright, but I want to restrict the dates to a certain range in history.
Removing theme support also makes it work, but that's basically the idea behind using the CJ component instead of MS common ocx.
Problem is the same on both US english and Swedish regional settings so it's not related to that.
I had the same issue with the CCRP datepicker! So it may be a bug in the Vista themed version of the native common control!
It could be possible to make a workaround in the DropDown event but it seems you can only access the datepicker date textbox from there, not affect the monthview dropdown that is also set to the wrong date.
 
Can you fix this or provide a workaround?
 



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net