Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 14th, 2003, 12:41 AM
vikaspa vikaspa is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Mumbai
Posts: 73 vikaspa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 12 m 57 sec
Reputation Power: 7
DtPicker : Can we show blank date and time in DtPicker

Thanks for great help rpovided by you.


I am displaying order date and time using DtPicker.

I want to show spaces / blank as default value of DtPicker

How shall I do it ?

With regards
Vikas Athavale

Reply With Quote
  #2  
Old January 15th, 2003, 08:25 AM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 4,840 Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 2 Days 27 m 47 sec
Reputation Power: 88
Send a message via ICQ to Onslaught
Actually, I am not sure that you can do this. Having something other than a date/time in a datapicker will cause a RTE.

Reply With Quote
  #3  
Old January 22nd, 2003, 10:51 AM
GnuKemist GnuKemist is offline
Linux Registered User 28620
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 1 GnuKemist User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to GnuKemist
Lightbulb

Hi there,

I also had the same problem at work but got around it. What you have to do is set the CheckBox property of the DTPicker to TRUE and then when your form loads, you first set the date to whatever you want (most likely today's date) and then you disable it by setting its value to NULL.

'# First, set date to today... then desables DTPicker #
DTPicker1.Value = Now
DTPicker1.Value = Null

Hope this helps!

Cheers,

Gnu Kemist

Reply With Quote
  #4  
Old November 24th, 2003, 01:38 PM
Watever Watever is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Montreal, Canada
Posts: 486 Watever User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 52 m 20 sec
Reputation Power: 5
I know this topic is really old. Nearly 1 year old.

but I was wondering if it was working and if it was possible to do it in Vb.Net

cause that's what I am doing

Code:
Me.DateTimePicker1.Checked = True
        Me.DateTimePicker1.Value = Now
        Me.DateTimePicker1.Value = System.DBNull.Value


but it's telling me that System.DBNull.Value can't be converted in a Date format.

cause I really need to have my datapicker to null.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > DtPicker : Can we show blank date and time in DtPicker


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway