473,395 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

simple datetimepicker questions

This example deals with a datetimepicker Date of Birth concept for a windows
form in VB 2005.

Simply put, if a user wants to enter the MM/DD/YYYY using the number pad,
how can I advance the cursor to the DD and then the YYYY without needing to
use the "/" key?? So the keystrokes look like "07041978" versus doing
"07/04/1978".

Secondly - if we don't know the D.O.B. at the time of input, we'd like to
make update the dataset with a blank (null) value.

Thanks much.
Aug 23 '06 #1
2 1714
Mafandon,

Have you ever looked to one of the thousand samples on internet about a
Numeric textbox.
What you ask you can do in the same way.

This are the answers limited to the microsoft.public.dotnet.languages.vb
newsgroup which is probably more suitable for your question because you need
the answer in code.
http://groups.google.com/group/micro...rch+this+group

You can create for your dbnull date in my opinion a check if 01010001 is
entered (the lowest date possible in DateTime and than change that for a
nothing (system.vbnull) in your database.

I hope this helps,

Cor

"mafandon" <ma******@discussions.microsoft.comschreef in bericht
news:6A**********************************@microsof t.com...
This example deals with a datetimepicker Date of Birth concept for a
windows
form in VB 2005.

Simply put, if a user wants to enter the MM/DD/YYYY using the number pad,
how can I advance the cursor to the DD and then the YYYY without needing
to
use the "/" key?? So the keystrokes look like "07041978" versus doing
"07/04/1978".

Secondly - if we don't know the D.O.B. at the time of input, we'd like to
make update the dataset with a blank (null) value.

Thanks much.

Aug 24 '06 #2
Thanks Cor,

It sounds like the answers for both questions are no? I've removed the drop
down box and am just using a maskedtextbox formatted for dates.

I didn't want to have to add another insert statement to my tableadapter for
inserting values into my table excluding the DOB column, but I guess that's
the answer there as well. I'll perform a check on " / /" and use the
appropriate insert statement.

Thanks again.

"Cor Ligthert [MVP]" wrote:
Mafandon,

Have you ever looked to one of the thousand samples on internet about a
Numeric textbox.
What you ask you can do in the same way.

This are the answers limited to the microsoft.public.dotnet.languages.vb
newsgroup which is probably more suitable for your question because you need
the answer in code.
http://groups.google.com/group/micro...rch+this+group

You can create for your dbnull date in my opinion a check if 01010001 is
entered (the lowest date possible in DateTime and than change that for a
nothing (system.vbnull) in your database.

I hope this helps,

Cor

"mafandon" <ma******@discussions.microsoft.comschreef in bericht
news:6A**********************************@microsof t.com...
This example deals with a datetimepicker Date of Birth concept for a
windows
form in VB 2005.

Simply put, if a user wants to enter the MM/DD/YYYY using the number pad,
how can I advance the cursor to the DD and then the YYYY without needing
to
use the "/" key?? So the keystrokes look like "07041978" versus doing
"07/04/1978".

Secondly - if we don't know the D.O.B. at the time of input, we'd like to
make update the dataset with a blank (null) value.

Thanks much.


Aug 24 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Angelina | last post by:
Hi, I have got two DateTimePicker's on my form to accept a guest arrival date and departure date.what i want to acheieve is ensure that the DateTimePicker2 (departure) is always greater than...
9
by: Guy | last post by:
I have extended the datetimepicker control to incorporate a ReadOnly property. I have used the new keyword to implement my own version of the value property, so that if readonly == true then it...
1
by: John Smith | last post by:
Hey folks, Got some strange behavior going on here. I have a datetimepicker with showcheckbox = true; If I set Checked=true and set the Text of the datetimepicker, then then the Checked...
0
by: Sumit | last post by:
Hi all, I have a datetimepicker on my windows form. When the user selects it i check whether the date entered is a Sunday or not & if its not a sunday i want that the control remains on the...
4
by: Jacek Jurkowski | last post by:
.... the minimum date of DateTimePicker is 1753-01-01. How to make DateTime to do not show nothing in its text if this date is the value? I have a form with a field LastLogonDate. If user hasn't...
1
by: Darin | last post by:
A customer asked this question and I don't see how it can be done. Currently, when using the datetimepicker, after you enter the month you have to either hit the right arrow or the "/" for it to...
3
by: Charlie | last post by:
In the top portion of the DateTimePicker, where the value of the date is displayed, how can I detect whether the month or day or year is currently focused, or, if ShowCheckBox = True, whether the...
4
by: jehugaleahsa | last post by:
Hello: We were hoping to allow users to have DateTimePicker value null so that a unused date is stored on a Database. Does the control support this? I am pretty sure it doesn't. How would you...
25
by: Brian | last post by:
I have a datetimepicker formated for just time, the user selects the time. I want to compare if that time is between midnight and 8 am dtmTime #11:59:59 PM# and dtmTime < #08:00:00 AM# this...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.