mp date picker control

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
10/8/2009 1:40:36 PM
Gravatar
Total Posts 67

mp date picker control

Hi, I noticed that the date picker control documentation was outright wrong for the latest version of mojo, but anyway I want to know how I can switch between themes for the actual calendar. It would be really helpful.

Thanks!

10/8/2009 4:09:52 PM
Gravatar
Total Posts 67

Re: mp date picker control

no worries, I over-wrote the ugliness. I would like to know how to do it for future reference, if anyone knows.

10/9/2009 11:32:59 AM
Gravatar
Total Posts 18439

Re: mp date picker control

Hi,

I just deleted that document because it is very old and out of date. Back when I first created that document I was shipping a mojoPortal.Web.Controls library separate from mojoPortal, but I stopped doing that long ago.

What changed since that original document was created is that we implemented a provider model around the DatePicker so it would be possible to later implement different date pickers and choose it by configuring a provider. However currently we only have one provider. For an example of using it I recommend look in the blog source code in the EditPost.aspx and in EditPost.aspx.cs

 

<mp:DatePickerControl ID="dpBeginDate" runat="server" ShowTime="True" CssClass="forminput">
                        </mp:DatePickerControl>

<mp:DatePickerControl ID="dpBeginDate" runat="server" ShowTime="True" CssClass="forminput"></mp:DatePickerControl>

Hope it helps,

Joe

 

10/9/2009 12:06:34 PM
Gravatar
Total Posts 67

Re: mp date picker control

No, I was more curious about switching the theme. I noticed that there are multiple stylesheets for the calendar control in the directory where the date picker is currently pulling its styles from, and I wanted to know how to switch to a different stylesheet. I got the date picker working right off the bat, after I figured out that I was using the wrong tag. I was very pleased, but thought the default theme was pretty ugly (sorry, I'm a designer first and developer second).

10/9/2009 12:22:57 PM
Gravatar
Total Posts 18439

Re: mp date picker control

The problem is that the provider model wrapped around it doesn't support all of the features of the jsCalendar. To do that you will need to not use our <mp:DatePicker, but instead use <mp:jsCalendarDatePicker which is a direct wrapper around the jsCalendar javascript. Then you can set the Theme property on the control so something like this:

<mp:jsCalendarDatePicker id="cal1" runat="server" Theme="CalendarMojo" ShowTime="true" />

valid options for theme are:

 

CalendarMojo,
CalendarBlue,
CalendarBlue2,
CalendarBrown,
CalendarGreen,
CalendarWin2k1,
CalendarWin2k2,
CalendarWin2kCold1,
CalendarWin2kCold2,
CalendarSystem,
CalendarTas

CalendarMojo, CalendarBlue, CalendarBlue2, CalendarBrown, CalendarGreen, CalendarWin2k1, CalendarWin2k2, CalendarWin2kCold1, CalendarWin2kCold2, CalendarSystem, CalendarTas

Hope it helps,

Joe

 

You must sign in to post in the forums. This thread is closed to new posts.