Forum Four51° Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Calendar Fomat: XX/XX/XXXX

 
Post new topic   Reply to topic    Forum Four51° Forum Index -> Pageflex (L3 - L4)
View previous topic :: View next topic  
Author Message
mvang



Joined: 29 Jan 2008
Posts: 80

PostPosted: Wed Aug 12, 2009 2:06 pm    Post subject: Calendar Fomat: XX/XX/XXXX Reply with quote

How can I format my date to XX/XX/XXXX.
For example: 08/12/2009 currently my variable comes in 8/12/2009. It is possible to have 2 digits for the month, 2 digits for the day?

Advanced Scripting:
spec['StartDate'].calendar(
{
width: "80",
format: "DayOfMonth/DayOfWeek/Year"
}
);
Back to top
View user's profile Send private message
Steve



Joined: 17 Jan 2008
Posts: 337

PostPosted: Wed Aug 12, 2009 2:31 pm    Post subject: Reply with quote

There is nothing in the native javascript date object that will do this, and the widget doesn't support that right now.

I'd recommend not using the calendar and instead use a mask:

spec['StartDate'].mask('##/##/####');
_________________
Steve

You can read about other advanced tech topics on the http://www.insightsfour51.com/?cat=3
Back to top
View user's profile Send private message
mvang



Joined: 29 Jan 2008
Posts: 80

PostPosted: Thu Aug 13, 2009 5:05 pm    Post subject: Reply with quote

I'm trying to create a script to format the date as: January 1, 2009.
But my date still come out as 1/1/09.

Below are my Advanced Script sample:

spec['Date'].calendar
({
width: "80",
format: "Month, Day Year"
});

OR

spec['Date'].calendar({
width: 200
});

spec['Date'].calendar.onChange = function() {
spec['Date'].calendar.value = spec['Date'].calendar.month() + " " + spec['Date'].calendar.dayOfMonth() + ", " + spec['Date'].calendar.year();
}

http://www.insightsfour51.com/wiki/index.php?title=Calendar
indicate value format of the date selection:
month(): Returns the text representation of the selected month. Ex: July.
dayOfMonth(): Returns the numeric representation of the selected day of the month. Ex: 20.
year(): Returns the numeric representation of the selected year. Ex: 2008.

Any help is greatly appreciated.
Thanks in advanced.
Back to top
View user's profile Send private message
mvang



Joined: 29 Jan 2008
Posts: 80

PostPosted: Wed Aug 19, 2009 10:34 am    Post subject: Reply with quote

Hello,

I've search online and did more testing but nothing seem to work.
I've tried the script below:
spec['Date'].calendar
({
width: "80",
format: "Month"
});

the result for the Month is "August" but as soon as I add the day format than the format goes back to 8/19/09.

Any help is greatly appreciated.
Thanks in advanced.
MV
Back to top
View user's profile Send private message
mvang



Joined: 29 Jan 2008
Posts: 80

PostPosted: Wed Sep 09, 2009 11:06 am    Post subject: Reply with quote

I'm still working on this project any help is greatly appreciated.
Thank You.

MV
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Forum Four51° Forum Index -> Pageflex (L3 - L4) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group