473,394 Members | 1,797 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,394 software developers and data experts.

How Do i Compare Two Dates Inputs using asp.net validator ?

Hi Every one !
Im using asp .net vs05 , i My form im using two text boxes where the Date is entered in any format (dd/mm/yyy or dd/MMM/yyyy)
Ex : From date ,To Date

Now ! How do i Ensure that Todate is not Greater than the From Date, Is it Feasible with Asp.net Compare Validator ??

Kindly Provide me with a valid Solution !!!

Thanks in Advance !
Oct 4 '07 #1
4 9471
Plater
7,872 Expert 4TB
Well if you have it go back to backend code, you cna create DateTime objects from them and compare those objects.
Oct 4 '07 #2
Well if you have it go back to backend code, you can create DateTime objects from them and compare those objects.
The Problem is ! i cant alert the User by using the Msgbox, in the case if iam using the Objects and Comparing those two, but , I hope there should be an client side validation like ajax to do Accomplish this task !!

It would be fine if iam Not using a msgbox for alerting the user . Any other solution ??
:)
Oct 5 '07 #3
Hi Every one !
Im using asp .net vs05 , i My form im using two text boxes where the Date is entered in any format (dd/mm/yyy or dd/MMM/yyyy)
Ex : From date ,To Date

Now ! How do i Ensure that Todate is not Greater than the From Date, Is it Feasible with Asp.net Compare Validator ??

Kindly Provide me with a valid Solution !!!

Thanks in Advance !
Hi
i m vikas here

my Id is vickyTech
There is very simple solution of this problem

U just use compare validator.

In that u have two property of validator

Operator and Type

in operator u set greaterthan (as u want) and in Type u set "Date"

U have two more things to set

"Control to compare" and "Control to validate"

u select the nane of ur controls

i will work
bye
Oct 5 '07 #4
Hi
i m vikas here

my Id is vickyTech
There is very simple solution of this problem

U just use compare validator.

In that u have two property of validator

Operator and Type

in operator u set greaterthan (as u want) and in Type u set "Date"

U have two more things to set

"Control to compare" and "Control to validate"

u select the nane of ur controls

i will work
bye

Hi ! Thanks for your Reply ,

I Tried it but it didnt work for the Format dd-MMM-yyyy , It didnt Compare those two dates ? :(

Any Solutions ?
Oct 6 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: jorntk | last post by:
Hi, How do i compare two date in YYYY-MM-DD format to determine which one is earlier? thanks and regards Jorn
9
by: Rich | last post by:
Thanks for the Help in my previous post. I've been working on this and it's almost what I want. I want to obtain the user's current age by comparing their date of birth (user inputs) to the...
1
by: atif | last post by:
how to compare two date without using compare validator thanx... ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeed.com The #1 Newsgroup...
0
by: TN Bella | last post by:
Hi, I am trying to get my compare validator to fire properly...Since I have panels the validator wouldn't work properly, the app would fire right but would insert the data regardless and the...
3
by: Sandy | last post by:
Hi All! I have a password textbox and a verify password textbox. I threw in the compare validator to make sure both values agree. I noticed, however, that immediately the compare validator...
3
by: thomson | last post by:
Hi, I have 5 aspx pages, In one page i have a Compare Validator Control, The four aspx pages are loading fast with similar controls, no code behind, But the page having Compare Validator Control...
1
by: jackiepajo | last post by:
Please help me, i want to compare dates between two check boxes like i want to compare inputs check in date and check out date to those stored in the database. please help....
6
by: ar555 | last post by:
I have a page with two textfields for dates (dateFrom, dateTo) which user inputs from a small popup calendar. Dates are in dd/mm/yyyy format. When user clicks on submit button, function is called to...
1
by: vrparekh | last post by:
in my webapplication,user pick date in dd/mm/yy format, and i want to compare that date with another date using compare validator but compare validator compare the dates using mm/dd/yy format. ...
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: 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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.