codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  JavaSript Problem In Mac Safari Browser  niteshkunwar at 03:54 on Monday, January 24, 2005
 

Hi all
I got 1 strange problem in java script here is the code please help me i am really stuck and i have to complete this project today.
i have to check that a date and time should be greater then current date and time
I am geeting date and time for date time picker as format mm//dd/YY hr:mm:ss
so here is the code
strdate = document.addSession.startDateTime;
var newdate = new Date(strdate.value);
if(document.addSession.startDateTime.value == "")
{
alert("Enter the Start Date");
document.addSession.startDateTime.focus();
return false;
}
else
{
var newdate = new Date(strdate.value);
var curdate = new Date();
if (curdate > newdate)
{
alert("Check the start Date and Time");
document.addSession.startDateTime.select();
document.addSession.startDateTime.focus();
return false;
}
}


Its working fine in all other browser like IE,netscape,Mozila
but its not working properly in Mac Safari Browser
If a alert(newdate)
its always giving some date like 14th dec 1901 time some 3 o clcok










CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  How to dynamically create a calendar when I click a button?
•  c++ tutorials
•  Update a second table
•  Trackin Site behaviour
•  variable scope problem
•  dynamic crystal report generation
•  execute an Excel macro when the sheet is changed from ASP.NET
•  Re: form
•  form


Recent Articles
Communicating with the Database (Using ADO)
MagicGrid
Simple Thumbnail Browsing Solution
Type Anywhere
A Better Moustrap: FmtDate to replace FormatDateTime
ASP.NET Forum Source Code
Internal Search Engine
Javascript Growing Window
Simple date validation
Search engine friendly URLs using ASP.NET (C#.NET)


Site Survey
Help us serve you better. Take a five minute survey. Click here!

© Copyright codetoad.com 2001-2005