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

datetime picker MVVM componentType

3 Answers 174 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Neeraj
Top achievements
Rank 1
Veteran
Neeraj asked on 24 Jun 2020, 04:18 PM

Hello,

        How to use Component Type in datetime picker MVVM? i tried using data-component-type="modern" , but it didnt worked 

3 Answers, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 26 Jun 2020, 11:02 AM

Hi Neeraj,

Indeed the component type option is ignored with the mvvm setting. We will further investigate the issue, until the official fix, as a workaround I can suggest you to extend the options of the DatetimePicker widget as follows:

kendo.ui.DateTimePicker.fn.options = $.extend(kendo.ui.DateTimePicker.fn.options, {componentType: 'classic'})
kendo.bind($("#example"), viewModel);

Please note that the options have to be extended before the view is bound to the model. Below you will find a small sample which demonstrates the above workaround:

Regards,
Georgi
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Neeraj
Top achievements
Rank 1
Veteran
answered on 14 Jul 2020, 06:16 PM
Hello, I tried in my asp.net mvc project . It is not rendering as in DOJO . Please see file attached . I am using bootstrap css files like 'row' and 'col-md-3'  and parent div has 'container' class of bootstrap nothing more
0
Georgi
Telerik team
answered on 16 Jul 2020, 12:52 PM

Hi Neeraj,

I tested the same using bootstrap, but it seems to work correctly:

Could you please examine it and let me know what I am missing?

Regards,
Georgi
Progress Telerik

Tags
Date/Time Pickers
Asked by
Neeraj
Top achievements
Rank 1
Veteran
Answers by
Georgi
Telerik team
Neeraj
Top achievements
Rank 1
Veteran
Share this question
or