| | |
start-date end-date Validation
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jun 2007
Posts: 9
Reputation:
Solved Threads: 1
Hello Friends ,
I m new in Javascript
i m trying to validate two date coming in the format 'DD-MON-YYYY' coming through PopUP-Calendar in two textboxes but unable to get required result I musing following function :
<script type="text/javascript">
function check(){
var SDate = document.form.previous_date.value;
var EDate = document.form.next_date.value;
if (SDate == '' || EDate == '') {
alert("Plesae enter both....");
return false;
}
var endDate =new Date.parse(EDate);
var startDate =new Date.parse.Date(SDate);
if(startDate > endDate)
{
alert("Please ensure that the End Date is greater than or equal to the Start Date.");
document.calldate.next_day.focus();
return false;
}
}
</script>
Thank In Advance
I m new in Javascript
i m trying to validate two date coming in the format 'DD-MON-YYYY' coming through PopUP-Calendar in two textboxes but unable to get required result I musing following function :
<script type="text/javascript">
function check(){
var SDate = document.form.previous_date.value;
var EDate = document.form.next_date.value;
if (SDate == '' || EDate == '') {
alert("Plesae enter both....");
return false;
}
var endDate =new Date.parse(EDate);
var startDate =new Date.parse.Date(SDate);
if(startDate > endDate)
{
alert("Please ensure that the End Date is greater than or equal to the Start Date.");
document.calldate.next_day.focus();
return false;
}
}
</script>
Thank In Advance
![]() |
Similar Threads
- Variable scope problem (C++)
- Total noob question (Database Design)
- Mailform error (PHP)
- hacktool.rootkit / backdoor.generic2.ppu issue (Viruses, Spyware and other Nasties)
- Calendar window is not coming for the Dynamic rows (JavaScript / DHTML / AJAX)
- Help with data validation on booking trip application... (MS Access and FileMaker Pro)
- Internet Explorer-OUT OF ORDER + More (Viruses, Spyware and other Nasties)
- BetterInternet, Start up Trojan, Aurora HELP!!! (Viruses, Spyware and other Nasties)
- Can Someone please check my project & comment/tips (C)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: text boxes w/ html
- Next Thread: Preventing the delay when src attribute of the images set via javascript
| Thread Tools | Search this Thread |
ajax ajaxcode ajaxexample ajaxhelp ajaxjspservlets animate automatically beta box browser bug calendar captchaformproblem checkbox child class close column createrange() css cursor date debugger dependent disablefirebug dom download dropdown editor element embed engine error events explorer ext file form forms getselection google gwt gxt hiddenvalue highlightedword hint html htmlform ie7 ie8 iframe images internet java javascript javascripthelp2020 jawascriptruntimeerror jquery jsf jsfile jump libcurl math media microsoft mimic object onmouseoutdivproblem onreadystatechange parent paypal pdf php player position post problem programming progressbar regex runtime scroll search security select shopping size software sql text textarea unicode w3c web website window windowofwords windowsxp wysiwyg \n





