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

jQuery DateRangePicker with Times

1 Answer 42 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
ww1711 asked on 17 Jan 2020, 04:00 PM


I'd like to implement a jQuery "DateRangePicker with Times" found here in a RadGrid EditFormTemplate.

When the following code is outside of the RadGrid, all works as expected: 

<div class="col-md-4 col-md-offset-2 demo">
        <input type="text" id="config-demo" class="form-control">
<script type="text/javascript">
        "timePicker": true,
        "linkedCalendars": false,
        "startDate": "01/11/2020",
        "endDate": "01/17/2020"
    }, function (start, end, label) {
        console.log("New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')");


However, when the code is inserted into the <FormTemplate> blocks, it does not work. Can anyone help with what I might be missing? All the required references (.js, .css) are available to be downloaded as a ZIP on the page linked above.

Alternatively, I'm open to listen to any recommendations on how to achieve a similar result as linked above via Telerik controls.



1 Answer, 1 is accepted

Sort by
Telerik team
answered on 21 Jan 2020, 01:58 PM

Hi Wayne,

Can you put the script inside telerik:RadScriptBlock - this works fine on my end as you can see in the attached video:


<EditFormSettings EditFormType="Template">
        <input type="text" name="datetimes" />
        <telerik:RadScriptBlock runat="server">
                $(function () {
                        timePicker: true,
                        startDate: moment().startOf('hour'),
                        endDate: moment().startOf('hour').add(32, 'hour'),
                        locale: {
                            format: 'M/DD hh:mm A'

Best Regards,
Progress Telerik

Get quickly onboarded and successful with UI for ASP.NET AJAX with the Virtual Classroom technical trainings, available to all active customers. Learn More.
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question