This is a migrated thread and some comments may be shown as answers.

[Solved] DatePicker with in PanelBar in PartialView

2 Answers 23 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
CodeAddict
Top achievements
Rank 1
CodeAddict asked on 23 Aug 2011, 01:19 AM
I am having a rendering issue when putting a DatePicker from a partial view within the PanelBar.

I am added the tab as follows:
.Items(items =>
{
items.Add()
                .ImageUrl("~/Content/Home/calendarImage.png")
                 .Text("Calendar")
                 .LoadContentFrom(Url.Action("_Menu", "Calendar"));
}
The partial view simply contains:
@(Html.Telerik().Calendar()
        .Name("Calendar")
        .Value((DateTime)ViewBag.selectedDate)        
)

What I am finding is that the DatePicker is not only rendering really ugly, but the back button is not going to the proceeding month but to some month selector.

I have stripped the PanelBar down to it's bare bones but still no luck.  I have also tried putting the calendar into a spitter section and it renders fine there.

Please respond soon as I am working on a demo for a client that is considering purchasing the licences.

Thank you,

2 Answers, 1 is accepted

Sort by
0
Accepted
Georgi Tunev
Telerik team
answered on 23 Aug 2011, 02:56 PM
Hi Codeaddict,

To avoid the problem, you could use the following style in your masterpage:

.t-panelbar .t-calendar .t-link
{
    padding: 0;
    line-height: normal;
}
 
.t-panelbar .t-calendar td .t-link
{
    padding-bottom: 0.3em;
    padding-left: 0.1em;
    padding-right: 0.45em;
    padding-top: 0.25em;
}

For convenience I added a small sample that shows this approach in action

All the best,
Georgi Tunev
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
CodeAddict
Top achievements
Rank 1
answered on 23 Aug 2011, 04:35 PM
Thanks that helped a lot.  There are still some display issues but I can try and work around those issues on my own.
Tags
PanelBar
Asked by
CodeAddict
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
CodeAddict
Top achievements
Rank 1
Share this question
or