Mosijava
Mosijava

Reputation: 4189

using jQuery UI datepicker in DotNetNuke instead Telerik RadCalendar

How Can I Substitute jQueryUI Datepicker With Telerik RadCalendar (default) in DotNetNuke 6+ for all mores including the core?

Telerik RadCalendar does'nt support my date format.

Thanks in advance

Upvotes: 4

Views: 2518

Answers (2)

Vishwajit G
Vishwajit G

Reputation: 520

DotNetNuke provides with inbuilt jquery.js and jquery-ui.js so you don't have to bother to link them separately

If you are developing a custom DNN module add this to your user control view.ascx file.

I have txtStartDate as a text field on the form where I wanted my calander to be rendered on click.

To achieve this I added this code at the top of my ascx page after the standard includes.

<script type="text/javascript" >
$(function () {
    $("#<%= txtStartDate.ClientID %>").datepicker();
});
</script>

The calender takes the size based on your text size if it is appearing bigger that your expectation

set it style like this

<style>
div.ui-datepicker{
font-size:10px;
}
</style>   

Upvotes: 3

Mitchel Sellers
Mitchel Sellers

Reputation: 63136

The process for this is really simple. Just use a regular textbox and do.

$("#<%= txtMyControl.ClientID %>").datepicker();

And you will be set to go!

You might need to request the registration of jQuery UI in the codebehind as well.

Upvotes: 3

Related Questions