Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: date format
eve
Junior Member

Posts: 2
Registered: 7/25/2005
Member Is Offline
posted on 7/25/2005 at 08:30 AM Reply With Quote
date format


i ablet o call the calendar only if my textbox has no value.. If i want to update or change, i cant do it.. any 1 help.. thankz

me error message : 'undefined' is a nulll object

i have use the following code,

function cal_gen_time1 (dt_datetime) {
return (
(dt_datetime.getHours() < 10 ? '0' : '') + dt_datetime.getHours() + ":"
+ (dt_datetime.getMinutes() < 10 ? '0' : '') + (dt_datetime.getMinutes()) + ":"
+ (dt_datetime.getSeconds() < 10 ? '0' : '') + (dt_datetime.getSeconds())
);
}


function cal_prs_date1 (str_date) {

var arr_date = str_date.split('-');

if (arr_date.length != 3) return cal_error ("Invalid1 date format: '" + str_date + "'.nFormat accepted is dd-mm-yyyy.");
if (!arr_date[2]) return cal_error ("Invalid2 date format: '" + str_date + "'.nNo day of month value can be found.");
if (!RE_NUM.exec(arr_date[2])) return cal_error ("Invalid3 day of month value: '" + arr_date[2] + "'.nAllowed values are unsigned integers.");
if (!arr_date[1]) return cal_error ("Invalid4 date format: '" + str_date + "'.nNo month value can be found.");
if (!RE_NUM.exec(arr_date[1])) return cal_error ("Invalid5 month value: '" + arr_date[1] + "'.nAllowed values are unsigned integers.");
if (!arr_date[0]) return cal_error ("Invalid6 date format: '" + str_date + "'.nNo year value can be found.");
if (!RE_NUM.exec(arr_date[0])) return cal_error ("Invalid7 year value: '" + arr_date[0] + "'.nAllowed values are unsigned integers.");

var dt_date = new Date();
dt_date.setDate(1);

if (arr_date[1] < 1 || arr_date[1] > 12) return cal_error ("Invalid month value: '" + arr_date[1] + "'.nAllowed range is 01-12.");
dt_date.setMonth(arr_date[1]-1);

if (arr_date[0] < 100) arr_date[0] = Number(arr_date[0]) + (arr_date[0] < NUM_CENTYEAR ? 2000 : 1900);
dt_date.setFullYear(arr_date[0]);

var dt_numdays = new Date(arr_date[0], arr_date[1], 0);
dt_date.setDate(arr_date[2]);
if (dt_date.getMonth() != (arr_date[1]-1)) return cal_error ("Invalid day of month value: '" + arr_date[2] + "'.nAllowed range is 01-"+dt_numdays.getDate()+".");

return (dt_date)
}
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Tigra Calendar
Product Demonstrations Live Demos
Free Download Free Download
Product Documentation Documentation
Support Forum Support Forum
 
Tigra Calendar PRO
Product Demonstrations Live Demos
Popup Calendar
Onpage Calendar
Modal Calendar
Product Documentation Documentation
Documenation Page
Change Log
Support Forum Technical Support
Support Forum
Customer Care System
Order Now ORDER NOW!
Add to Cart
View Cart
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004