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: calender in yyyy/mm/dd format
geetha
Newbie

Posts: 1
Registered: 6/8/2006
Location: hyderabad
Member Is Offline
posted on 6/8/2006 at 02:54 AM Reply With Quote
calender in yyyy/mm/dd format


from this attachment i am getting date in mm/dd/yyyy format but i want date in yyyy/mm/dd format.

pl reply me

regards
asha

Attachment: date12.html (1.33kb)
This file has been downloaded 775 times
View User's Profile View All Posts By User U2U Member
Compiler
Newbie

Posts: 1
Registered: 8/3/2006
Location: Russia
Member Is Offline
posted on 8/3/2006 at 02:49 AM Reply With Quote

Quote:
I?eaeiaeuiia niiauaiea io geetha
from this attachment i am getting date in mm/dd/yyyy format but i want date in yyyy/mm/dd format.

pl reply me

regards
asha


Hi all you need is to modify calendar1.js in two places:
this for format yyyy-mm-dd
// date generating function
function cal_gen_date1 (dt_datetime) {
return (
(dt_datetime.getDate() < 10 ? '0' : '') + dt_datetime.getDate() + "-"
+ (dt_datetime.getMonth() < 9 ? '0' : '') + (dt_datetime.getMonth() + 1) + "-"
+ dt_datetime.getFullYear()
);
}


and second to parse already input date:
// date parsing function
function cal_prs_date1 (str_date) {

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

if (arr_date.length != 3) return cal_error ("Invalid date format: '" + str_date + "'.\nFormat accepted is dd-mm-yyyy.");
if (!arr_date[0]) return cal_error ("Invalid date format: '" + str_date + "'.\nNo day of month value can be found.");
if (!RE_NUM.exec(arr_date[0])) return cal_error ("Invalid day of month value: '" + arr_date[0] + "'.\nAllowed values are unsigned integers.");
if (!arr_date[1]) return cal_error ("Invalid date format: '" + str_date + "'.\nNo month value can be found.");
if (!RE_NUM.exec(arr_date[1])) return cal_error ("Invalid month value: '" + arr_date[1] + "'.\nAllowed values are unsigned integers.");
if (!arr_date[2]) return cal_error ("Invalid date format: '" + str_date + "'.\nNo year value can be found.");
if (!RE_NUM.exec(arr_date[2])) return cal_error ("Invalid year value: '" + arr_date[2] + "'.\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[2] < 100) arr_date[2] = Number(arr_date[2]) + (arr_date[2] < NUM_CENTYEAR ? 2000 : 1900);
dt_date.setFullYear(arr_date[2]);

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

return (dt_date)
}
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 3/9/2007 at 10:27 PM Reply With Quote

Ok, we have added the format to the standard distribution. Please re-download.
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