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

All I get is a blank calendar when using both datetimepicker and datetime

2 Answers 48 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 05 Sep 2013, 11:20 AM
I'm doing MVC4 with razor.  I have tried using the datetimepicker with a grid and without and I get the same result.  I suspect it is my CSS but I'm not very proficient at doing CSS.   I use the kendo.common.min.css and kendo.default.min.css.  I've changed the theme slightly for width and fonts on the grid.  

My editor template is as follows, though I have the same problem when I use datetimepicker outside of grid.

@model  DateTime?

@(Html.Kendo().DateTimePickerFor(m => m)
.Min(new DateTime(2010, 1, 1, 10, 0, 0)) //Set min time of the datetimepicker
.Max(new DateTime(2010, 1, 1, 20, 0, 0)) //Set min date of the datetimepicker
.Value(DateTime.Now) //Set the value of the datetimepicker
 
)

To use without the grid, i just included:
    <div id='to-do'>
@(Html.Kendo().DateTimePicker()
        .Name("datetimepicker")
        .Value(DateTime.Now)
)
</div>

My datetimepicker shows up with the month on top, nothing as far as the days, and then a bunch of gray space to the right.  I'm at a loss as to what to try or what to furnish you.

 

 

2 Answers, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 09 Sep 2013, 07:30 AM
Hi Thomas,

I am afraid that the provided information is not sufficient enough in order to determine where exactly the problem comes from. The provided configuration looks valid. As you said probably the problem comes from the changes in the CSS that you made, however you did not send the 'slightly changed' CSS code.

Could you please try to replace the modified file with the original one and confirm that the issue is connected with the styling? As a general information, modifying the existing themes manually is not recommended. Did you tried using the theme builder tool?

Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Accepted
Thomas
Top achievements
Rank 1
answered on 09 Sep 2013, 11:47 AM
I put the default css back and it resolved the problem.   Changing the default css (especially when it is the min version) is not a good thing to do I've learned unless you really know what you are doing.
Tags
Date/Time Pickers
Asked by
Thomas
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Thomas
Top achievements
Rank 1
Share this question
or