473,654 Members | 3,103 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Weird problem with DatePicker

Every time I jumped to a new month, the app kept popping up the message box
for subsequent months until 2050! If I stayed within the same month (current
month), it worked fine.
Please take a look at the following codes. Nothing special about it.
Please help!!

Bill

Private Sub dtPicker1_Value Changed(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles dPicker1.ValueC hanged

If dPicker1.Value >= Today Then

Beep()

MsgBox("Invalid Sales date: " & dPicker1.Value & vbCrLf & _

"Please choose a valid Sales date.")

Exit Sub

Else

Call DoLoadCombo()
End If

End Sub
Nov 20 '05 #1
2 1275
Bill
Do you have more than one DateTimePicker?
I see your code has dtPicker1 and dPicker1?
---
Steve Stein -VB .NET Team
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| From: "Bill Nguyen" <bi************ *****@jaco.com>
| Subject: Weird problem with DatePicker
| Date: Mon, 3 May 2004 10:36:40 -0700
| Lines: 33
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
| Message-ID: <#Y************ **@TK2MSFTNGP12 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.langua ges.vb
| NNTP-Posting-Host: 66-162-157-205.gen.twtelec om.net 66.162.157.205
| Path:
cpmsftngxa10.ph x.gbl!TK2MSFTFE ED01.phx.gbl!TK 2MSFTNGP08.phx. gbl!TK2MSFTNGP1 2
phx.gbl
| Xref: cpmsftngxa10.ph x.gbl microsoft.publi c.dotnet.langua ges.vb:200228
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.vb
|
| Every time I jumped to a new month, the app kept popping up the message
box
| for subsequent months until 2050! If I stayed within the same month
(current
| month), it worked fine.
| Please take a look at the following codes. Nothing special about it.
| Please help!!
|
| Bill
|
| Private Sub dtPicker1_Value Changed(ByVal sender As System.Object, ByVal e
As
| System.EventArg s) Handles dPicker1.ValueC hanged
|
| If dPicker1.Value >= Today Then
|
| Beep()
|
| MsgBox("Invalid Sales date: " & dPicker1.Value & vbCrLf & _
|
| "Please choose a valid Sales date.")
|
| Exit Sub
|
| Else
|
| Call DoLoadCombo()
|
|
| End If
|
|
|
| End Sub
|
|
|

Nov 20 '05 #2
Steve;
Yes, but it's not the problem. There must be something else that caused the
looping. I had to set the maxdate value to the same month so that it won't
jump to subsequent months. This worked for me but I still cannot figure out
what wrong with the codes.
Thanks
Bill

""Steven Stein [MSFT]"" <ss****@online. microsoft.com> wrote in message
news:02******** *****@cpmsftngx a10.phx.gbl...
Bill
Do you have more than one DateTimePicker?
I see your code has dtPicker1 and dPicker1?
---
Steve Stein -VB .NET Team
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Bill Nguyen" <bi************ *****@jaco.com>
| Subject: Weird problem with DatePicker
| Date: Mon, 3 May 2004 10:36:40 -0700
| Lines: 33
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
| Message-ID: <#Y************ **@TK2MSFTNGP12 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.langua ges.vb
| NNTP-Posting-Host: 66-162-157-205.gen.twtelec om.net 66.162.157.205
| Path:
cpmsftngxa10.ph x.gbl!TK2MSFTFE ED01.phx.gbl!TK 2MSFTNGP08.phx. gbl!TK2MSFTNGP1 2 phx.gbl
| Xref: cpmsftngxa10.ph x.gbl microsoft.publi c.dotnet.langua ges.vb:200228
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.vb
|
| Every time I jumped to a new month, the app kept popping up the message
box
| for subsequent months until 2050! If I stayed within the same month
(current
| month), it worked fine.
| Please take a look at the following codes. Nothing special about it.
| Please help!!
|
| Bill
|
| Private Sub dtPicker1_Value Changed(ByVal sender As System.Object, ByVal e As
| System.EventArg s) Handles dPicker1.ValueC hanged
|
| If dPicker1.Value >= Today Then
|
| Beep()
|
| MsgBox("Invalid Sales date: " & dPicker1.Value & vbCrLf & _
|
| "Please choose a valid Sales date.")
|
| Exit Sub
|
| Else
|
| Call DoLoadCombo()
|
|
| End If
|
|
|
| End Sub
|
|
|

Nov 20 '05 #3

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

Similar topics

6
3036
by: Jure Erznoznik | last post by:
I just spent the whole day on solving this problem but still have no success. This is what i do: ModalDialog.window = window.open("", "error", "toolbar=no,width=" + iWidth + ",height=" + (iHeight + 100) + "," + "left=" + cx + ",top=" + cy + "," + "status=no,resizable=no,modal=yes,dialog=yes");
7
17003
by: Malcolm Webb | last post by:
I use the Microsoft Access Calendar (ActiveX) to pass dates into queries and reports. I have recently come across the Microsoft Access DatePicker developed by Brendan Kidwell and I now use this to input dates into various text boxxes on my forms. One form has the capacity for over 20 different dates and using the DatePicker is far easier than typing in individual dates as I used to. Does anyone else use Brendan Kidwell's DatePicker,...
8
1290
by: Alan Silver | last post by:
Hello, I'm trying to write a simple user control as an exercise (and 'cos it might be useful). I am trying to do a simple date picker, which consists of three drop down lists, one for the day, one for the month and one for the year. I know this isn't earth-shattering stuff, but I'm still learning, so please be patient!! I'm having trouble with the properties of the control. I have created the control OK and it displays fine. I added a...
2
1737
by: flipdoubt | last post by:
What do most people use for a DatePicker and is a DatePicker included in ASP.NET 2.0? I've seen some of the commercial products out there, but the redistributable license for most of them is too steep. Seems like a lot for one simple control. Suggestions
3
2395
by: Nathan Sokalski | last post by:
I am working on a simple user control composed of 3 DropDownLists that will be used to select Dates. The purpose of the control is to all the user to choose a date using dropdown lists but not need to worry about choosing a non-existing date (due to different months having different numbers of days). They all have AutoPostBack="True", but when the eventhandler attempts to use the SelectedIndex property, it is always the same. Here is the code: ...
2
1691
by: Pipo | last post by:
Nobody knows how to get the values provided in the client can be read in the user-control? If have made a Web Custom Control with 2 textboxes and 1 dropdownlist. The user fills in my control (the textboxes and the dropdownlist) and lots more stuff on the page. When the user wants to save the page he'll click the save button. The server gets the postback but I can read out the filled in controls (in my control). The textboxes text = ""...
0
1289
by: Armand | last post by:
Hi All, is anyone of you have any good resource about implementing datepicker that is binded into asp:textbox control? I do have a client side datepicker in JS, but it is binded to html input tag. Do you know how to bind JS to asp:textbox control? Thanks for all of your input, I really appreciate it
8
10380
by: shaielinna | last post by:
<? ob_start(); session_start(); require('../includes/inc.php'); require('../includes/settings.php'); include("../includes/dbconnect.php");?> <?php // requires the class require "../includes/class.datepicker.php";
6
6998
by: ichibon | last post by:
Hi, I have trouble setting the position of the DatePicker, a control from WPF Toolket June 2009 release. When click on the DatePicker control, the Calendar always open as a drop down and expands to the right, but the Calendar goes out of bound as the DatePicker control is aligned to the Right of the screen. Since I cannot change the location or alignment of the DatePicker, I would like the Calendar opens up as a drop down but expands to...
0
8372
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8285
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8814
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8475
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7304
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4293
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2709
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1915
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1592
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.