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

Giving up on Telerik, It just does not work, What Am I doning Wrong??

8 Answers 144 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
AppDev
Top achievements
Rank 1
AppDev asked on 13 Aug 2019, 10:32 PM

For 3 or maybe four years I have tried to understand and make telerik work... and it is just impossible to get this thing to work in a simple MVC application... Clearly people make it work... but for me it's not possible it seems.

 

I have followed all the steps to get telerik into my application and when it comes to making the datetime picker work... it does nothing..

So let me ask.

 

If I have an existing MVC application that has a datatime picker working in it 

Is it not possible to get the telerik date time picker to work?

 

This what I have now and this used the datetime picker that id default to the MVC I am guessing 

                <div class="form-group">

                    @Html.LabelFor(model => model.RES_START_DATE, htmlAttributes: new { @class = "control-label col-md-3" })

                    <div class="col-md-6">

                        @Html.EditorFor(model => model.RES_START_DATE, new { htmlAttributes = new { @class = "datepicker" } })
                        @Html.ValidationMessageFor(model => model.RES_START_DATE, "", new { @class = "text-danger" })
                    </div>

 

The above code work just fine with a datetime picker that must be a default thing...

 

But as soon as I added the attempt to use the Kendo dateime picker as listed in the example I get nothing ..

I am following these directions... (see below)and I have been trying to get any telerik control to work for 3 years with no luck

I must be doing something wrong. I come back everything I write an application because the controls look so nice...

but I end up with the same result. Nothing

https://docs.telerik.com/aspnet-mvc/getting-started/asp-net-mvc-5#add-telerik-ui-for-aspnet-mvc

When I add: @(Html.Kendo().DatePicker().Name("datepicker"))

To my mvc application I get nothing but a blank field... each and every time I try...

Pure Kendo nothingness...

Also in the browser's f12 view I get what you see in the screen shots.

I am pretty much giving up on telerik after this attempt so this nightmare can be over..

but since I have the forums I thought I would give it one my try.

 

Please see screen shots if you have time to assist as I am totally lost! Thank You!

 

8 Answers, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 15 Aug 2019, 10:52 AM

Hello,

 

I am sorry that you had an unpleasant experience with the setup of the components. I have examined the provided screenshots and would like to give some pointers that will hopefully get your project going. 

 

In the _Layout page I noticed that the styles are referenced using bundles and via linking the CSS files directly. Note that referencing Kendo scripts and styles will likely result in client-side errors and can prevent the widgets from working as expected. It is recommended to reference the resources only once in the head section of the page.

 

With that said, I have prepared a sample project with a DatePicker widget that you can use for reference. Give the attached project a try and let me know how it works for you.

 

Regards, Viktor Tachev
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
AppDev
Top achievements
Rank 1
answered on 19 Aug 2019, 07:59 PM

Hello thank you for trying to help... I have everything you have in the example you have me and still no go. :(

I have attached a version of the layout file from our application.

I intially followed what is listed here: https://docs.telerik.com/aspnet-mvc/getting-started/asp-net-mvc-5#add-telerik-ui-for-aspnet-mvc

 

Based on your example... the information listed on the telerik site is not the right example to follow I am guess?

 

Also I have all the elements you have in your code and I still get nothing.

 

One last question...you have the following:

        <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2019.2.619/styles/kendo.common.min.css">
        <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2019.2.619/styles/kendo.default.min.css">

        <script src="http://code.jquery.com/jquery-1.12.3.min.js"></script>
        <script src="http://kendo.cdn.telerik.com/2019.2.619/js/jszip.min.js"></script>
        <script src="http://kendo.cdn.telerik.com/2019.2.619/js/kendo.all.min.js"></script>
        <script src="http://kendo.cdn.telerik.com/2019.2.619/js/kendo.aspnetmvc.min.js"></script>
    </head>

 

These all seem to go to a website and not the content folder on the application.

Yet on the telerik site the directions state:

 

Use Local JavaScript and CSS
Below are listed the steps for you to follow when copying the required JavaScript and CSS files in the Visual Studio Solution of the application.
Navigate to the install location of Telerik UI for ASP.NET MVC. By default, it is in C:\Program Files (x86)\Progress\. For versions prior to R3 2017, the default install location is in C:\Program Files (x86)\Telerik\.
Drag the js directory from the install location and drop it in Visual Studio over the Scripts folder of the application.
Drag the styles directory from the install location and drop it in Visual Studio over the Content folder of the application.
Rename the Scripts/js directory to Scripts/kendo. Rename Content/styles to Content/kendo.

I mean seriously what gives? 

It seems like conflicting information.... we copy all of the stuff into folders in the application... then we ignore that and get the java scripting from websites??? This is very confusing.

0
AppDev
Top achievements
Rank 1
answered on 19 Aug 2019, 09:29 PM

Here is all of my Source Code:

On the create page I have:

***************************************************************

 @(Html.Kendo().DatePicker().Name("datepicker"))

***************************************************************

This does not work for me on this page.

But more importantly I am trying to get it to replace this datepicker

***************************************************************************************************************************

@Html.EditorFor(model => model.START_DATE, new { htmlAttributes = new { @class = "datepicker" } })

***************************************************************************************************************************

Any help would be appreciated. Thank You 

 

I have attached all of the related source codes

0
Viktor Tachev
Telerik team
answered on 21 Aug 2019, 11:40 AM

Hi,

 

There are multiple approaches you can use to reference the scripts and styles in the _Layout file - local resources and CDN. When referencing local resources you can use bundling to let the framework combine the styles and scripts. In the example from my previous post the resource files are referenced from CDN. 

You can see more information on both approaches in the Include JavaScript and CSS Files section in the Creating Applications article.

Note that the resource files should be included only once. Referencing the CSS or JavaScript files will result in errors and the widgets will likely not be rendered on the page.

 

With that said, I have updated the sample so it uses bundles for referencing the scripts and styles. Furthermore, I added a form where EditorFor is used for a DateTime field. 

When EditorFor is used the framework will look for a partial view with name matching the type of the edited field - in this case DateTime. The partial View should be located in the ~/Views/Shared/EditorTemplates folder. 

 

Regards, Viktor Tachev
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
AppDev
Top achievements
Rank 1
answered on 22 Aug 2019, 08:57 PM

Hi Viktor,

 

Thank you again for your example. But it still did not work for use.

I think it is pretty clear that telerik is not the product that we thought it was and will most likey be cancelling or subscription as it just does not work in our application. It boggles my mine that a simple date picker is so elusive but it has been for a long time.

 

I looked at you code and mirrored you example onto our code with no success.

 

My guess is that you cannot add telerik to a program that was built without it.

It make me sad be cause we wanted to update our mvc with some nice looking telerik controls.. but its clear telerik does not work.

Thanks again for trying to help.

0
AppDev
Top achievements
Rank 1
answered on 22 Aug 2019, 09:16 PM

Also just you that you know. I followed this example to the letter as well and it all just does not work. I get a box with not date selector.

 

0
AppDev
Top achievements
Rank 1
answered on 22 Aug 2019, 09:17 PM

Sorry... I forgot the post the link https://docs.telerik.com/aspnet-mvc/getting-started/asp-net-mvc-5

This example should really be updated as it does not work.

0
Viktor Tachev
Telerik team
answered on 26 Aug 2019, 02:17 PM

Hello,

 

In order for a Kendo component to be shown correctly in an MVC application it is important to have the Kendo.Mvc.dll referenced in the project and to also the client-side resources should be included. The client-side files - CSS and JavaScript can be referenced locally (using bundles) or from a CDN service. When all resources are available you should be able to use the components.

 

With that said, would you send us the project where the Kendo DatePicker widget is not rendered so we can examine it? Alternatively, you can modify the sample from my previous post so the behavior you are seeing is replicated and send it back. This will enable us to look into the behavior you are experiencing and see what is causing it. 

 

Regards,
Viktor Tachev
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Date/Time Pickers
Asked by
AppDev
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
AppDev
Top achievements
Rank 1
Share this question
or