Enhance jDatePicker with more features.

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.
9/20/2011 4:58:18 AM
Gravatar
Total Posts 192

Enhance jDatePicker with more features.

Hi joe.

can you please enhance jDatePicker with some more attributes like changemonth="true" and changeYear="true"?

I'm wanted to use DatePickerControl and let uesr to select month and year from dropdownlist, but it's not currently possible unless I run my own script.

it's easy by just adding showMonth:true, showYear:true to the following code where appropriate.

 

script.Append("{");

            script.Append("showOn: '" + showOn + "'");
            if (buttonImage.Length > 0)
            {
                //script.Append(",buttonImage: '" + Page.ResolveUrl("/Data/SiteImages/calendar.png") + "' ");
                script.Append(",buttonImage: '" + Page.ResolveUrl(buttonImage) + "' ");
            }

            if (buttonImageOnly) { script.Append(",buttonImageOnly: true"); }
            script.Append(",buttonText:'...'");

            script.Append(",duration: ''");

9/22/2011 8:07:35 AM
Gravatar
Total Posts 18439

Re: Enhance jDatePicker with more features.

Hi,

This is already possible with the latest code, see this thread.

Best,

Joe

9/25/2011 11:44:02 AM
Gravatar
Total Posts 192

Re: Enhance jDatePicker with more features.

hi joe.

if (changeMonth) { script.Append(",changeMonth:true"); }
            if (changeYear) { script.Append(",changeYear:true,yearRange:'" + yearRange + "'"); }

are added only to the SetupOldScript.

they need to be added to SetupScript as well.

 

9/25/2011 1:14:57 PM
Gravatar
Total Posts 18439

Re: Enhance jDatePicker with more features.

Oops, thanks for letting me know. I've corrected it and pushed the change to the source code repository.

Note that it is also possible to configure it for existing features. For example to show the year and month selectors in the date picker used for blog posts you can put this in the theme.skin file of your skin.

<mp:DatePickerControl runat="server" SkinID="blog"
ShowMonthList="true"
ShowYearList="true"
/>

Note that for DatePickers without a skinid you just add another one to theme.skin without the skinid property like this:

<mp:DatePickerControl runat="server"
ShowMonthList="true"
ShowYearList="true"
/>

For other specific features you may need to look at the existing control declaration to determine what if any skinid it has.

Best,

Joe

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