![]() |
[SOLVED] DateTimePicker Display Bug!? |
Post Reply ![]() |
Author | ||
Xander75 ![]() Senior Member ![]() ![]() Joined: 26 April 2007 Status: Offline Points: 353 |
![]() ![]() ![]() ![]() ![]() Posted: 25 August 2010 at 4:57am |
|
Hi,
I am using several DateTimePicker controls on a form and my requirement initally is to have these blank so the user must enter a date. I have done this using the following code in the Form Load event:
So far so good, the control is blank and all seems fine... until I try and select a date, without setting the CustomFormat to "dd/mm/yyyy" I get no date appearing in the control so using the following code I get the date to appear, however the date displays as "25/00/2010":
The Debug.Print lines cleary print the date as "25/08/2010" but the control displays "25/00/2010", is this a bug or am I doing something wrong? Thanks... |
||
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6) |
||
![]() |
||
Xander75 ![]() Senior Member ![]() ![]() Joined: 26 April 2007 Status: Offline Points: 353 |
![]() ![]() ![]() ![]() ![]() |
|
Hi,
I have resolved my issue however I am not sure if the above mentioned is a bug or not as the month in CustomFormat "dd/mm/yyyy" is displaying as "00" so I will leave this open for now... I managed to make the DateTimePicker display as blank and then display the correct date on change by using the following code:
|
||
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6) |
||
![]() |
||
Hemesh ![]() Senior Member ![]() Joined: 10 August 2010 Status: Offline Points: 135 |
![]() ![]() ![]() ![]() ![]() |
|
maybe try dd/MM/yyyy instead of dd/mm/yyyy?
|
||
Product: Xtreme SuitePro (ActiveX) version 18.5.0
Platform: Windows 7 Enterprise (64-bit) Language: Visual Basic 6.0 |
||
![]() |
||
Xander75 ![]() Senior Member ![]() ![]() Joined: 26 April 2007 Status: Offline Points: 353 |
![]() ![]() ![]() ![]() ![]() |
|
Hemesh,
Thanks for that, this has resolved the issue I was having.
|
||
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6) |
||
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |