Date Comparision In Two Textboxes.(veryyyyyyyyyyy Urgent)

srivalli

Well-known member
Joined
May 4, 2005
Messages
189
Programming Experience
Beginner
hello,
i have a textbox and a date time picker besides it.
when i select one date in datepicker control,that dat will be displayed in the textbox. for that i used the code

TEXTBOX1.TEXT=DATETIMEPICKER1.TEXT

and i one more textbox and a date time picker besides it.
when i select date in datepicker control,that dat will be displayed in the
textbox2.
for that i used the code
TEXTBOX2.TEXT=DATETIMEPICKER2.TEXT

NOW, I WANT TO CHECK THAT THE DATE ENTERED IN THE SECOND TEXTBOX2 IS ALWAYS GREATE THAN THE DATE ENTERED IN THE TEXTBOX1.

I WANT THE VALIDATION CONDITION.
THANK U
 

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,579
Location
Sydney, Australia
Programming Experience
10+
In the ValueChanged event handler for DateTimePicker1, simply set the MinDate of DateTimePicker2 to the current Value of DateTimePicker1. If this is what kulrom suggested I apologise as I haven't checked his code.
 

JuggaloBrotha

VB.NET Forum Moderator
Staff member
Joined
Jun 3, 2004
Messages
4,524
Location
Lansing, MI; USA
Programming Experience
10+
the thread kulrom posted is comparing a date in two different textboxes

in this case it's a textbox vs datetimepicker

i dunno if that makes a difference or not but i thought i'd mention it
 

srivalli

Well-known member
Joined
May 4, 2005
Messages
189
Programming Experience
Beginner
query regarding datetimepicker

i already got the solution for my query.
i tried ur method only
thank for ur suggestion.



jmcilhinney said:
In the ValueChanged event handler for DateTimePicker1, simply set the MinDate of DateTimePicker2 to the current Value of DateTimePicker1. If this is what kulrom suggested I apologise as I haven't checked his code.
 

srivalli

Well-known member
Joined
May 4, 2005
Messages
189
Programming Experience
Beginner
dates comparision

the thread which u forwarded for comparision of dates in 2 textboxes ,it is showing some error.
(coding error).
if u have any ideas or suggestions u r welcome.

my query is

i have 2 textboxes and 2 datetimepickers
in first textbox, i ll select the date from the DTP1
my required format is dd/mm/yyyy.

i the second textbox also i want to display in dd/mm/yyyy format only ,but the date greater than the date in the textbox

thank u



kulrom said:
http://www.vbdotnetforums.com/showthread.php?t=3205

your answer has been answered already ... maybe it need to be extended for awhile?

Ok, we can do it ... back to original thread and i'll help you out ...

Cheers ;)
 

srivalli

Well-known member
Joined
May 4, 2005
Messages
189
Programming Experience
Beginner
comparing dates in 2 txbs with the help od dtpks.

hello,
actually i want to enter dates in two textboxes with the help of datetimepicker.
but the format i want to enter in the textbox when i select the date in the datetimepicker is dd\mm\yyyy.

i want to validate the date in the textbox2 is always greater than the date in the textbox1.
i think now i am very clear.
ok
thk u


kulrom said:
Hi,
I'm not sure what do you want to achieve. Do you want to enter date/s through keyboard rather but through datatimepicker? you're really confusing me... :(

anyway check this out ... Cheers ;)
 
Top Bottom