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

Can't get to work in Electron

2 Answers 248 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Tom
Top achievements
Rank 1
Tom asked on 19 Nov 2016, 06:24 PM

Here's what I've done:

  1. Created an Electron app, and verified that it works
  2. Copied the Kendo UI js and styles directories into my app's directory
  3. Modified the index.html file per the demo instructions to use a datepicker:
<!DOCTYPE html>
<html>
    <head>
        <title>Welcome to Kendo UI!</title>
        <link href="../telerik/styles/kendo.common.min.css" rel="stylesheet" />
        <link href="../telerik/styles/kendo.default.min.css" rel="stylesheet" />
        <script src="../telerik/js/jquery.min.js"></script>
        <script src="../telerik/js/kendo.all.min.js"></script>
    </head>
    <body>
        <input id="datepicker" />
        <script>
            $(function() {
                $("#datepicker").kendoDatePicker();
            });
        </script>
    </body>
</html>

 

However, when I run the app, I get a text box on the page; not the datepicker.

Is there something else I need to do?

 

2 Answers, 1 is accepted

Sort by
0
Tom
Top achievements
Rank 1
answered on 19 Nov 2016, 06:49 PM

I found the workaround.

 After referencing jquery.min.js, the following line is needed

<script>window.jQuery = window.$ = typeof module === 'object' ? module.exports : jQuery</script>
0
Stefan
Telerik team
answered on 21 Nov 2016, 12:10 PM
Hello Tom,

I'm glad to hear that the issue is resolved.

Also, I can suggest checking the following post in our blog describing the integration between Electron and Kendo UI:

http://developer.telerik.com/featured/desktop-apps-with-electron-and-kendo-ui/

Additionally, I would like to thank you for sharing the solution with the Kendo UI community.

Regards,
Stefan
Telerik by Progress
Kendo UI is ready for Visual Studio 2017 RC! Learn more.
Tags
General Discussions
Asked by
Tom
Top achievements
Rank 1
Answers by
Tom
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or