question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

jquery UI DatePicker in Angular

See original GitHub issue

Are you requesting a feature, reporting a bug or ask a question?

Bug/Question

What is the current behavior?

I’m trying to use the jquery UI DatePicker example (https://surveyjs.io/Examples/Library/?id=custom-widget-datepicker&platform=Angular2) with Angular2 but I’m having issues. It seems like there shouldn’t be anything special besides including jquery and specifying type of datepicker in the json. Is that all that’s needed?

When I do those things the question simply doesn’t render. I’ve recently pulled and now I’m on 1.0.1 release.

Also the editor does not support the datepicker type. If you copy the custom-widget-datepicker json into the editor (https://surveyjs.io/Editor/Editor/) it says the property type is incorrect in the object.

I’m unsure on how surveyjs knows to pick up and use the datepicker type. Looking in the source the only references I could find were in this plugins page: https://github.com/surveyjs/surveyjs/tree/master/src/plugins. And there it specifies to rebuild with some file changes.

I feel like I’m missing something simple here. Thanks!

Specify your

  • browser: chrome
  • browser version: 63.0.3239.132
  • surveyjs platform: angular2
  • surveyjs version: 1.0.1

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dmitrykurmanovcommented, Jan 19, 2018

I think that we need to create a new issue in the widgets repo. And I’ve created it https://github.com/surveyjs/widgets/issues/23

1reaction
wollermancommented, Jan 16, 2018

Looking through where the widget gets added I also checked: console.log(Survey.CustomWidgetCollection.Instance);. The widget datepicker seems to be available here:

// CustomWidgetCollection
{
  "widgetsValues": [
    {
      "name": "datepicker",
      "widgetJson": {
        "name": "datepicker",
        "title": "Date picker",
        "iconName": "icon-datepicker",
        "htmlTemplate": "<input class='form-control widget-datepicker' type='text' style='width: 100%;'>"
      },
      "htmlTemplate": "<input class='form-control widget-datepicker' type='text' style='width: 100%;'>"
    }
  ],
  "widgetsActivatedBy": {
    "datepicker": "customtype"
  },
  "onCustomWidgetAdded": {}
}

But as mentioned it’s not in the Survey.JsonObject.metaData.classes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular - jQuery UI Date Picker using Directives - YouTube
Angular Custom Pagination using Directive · What is Observable | Observables | Angular 12+ · Date Picker Widget Control in JQuery UI ·...
Read more >
Jquery Date Picker in angular 8 - Stack Overflow
You need to make sure , that you call $( '#startDate' ).datepicker after your view is rendered on the UI, To do this...
Read more >
How to implement jQuery UI Datepicker Widget in your ...
The jQuery Datepicker provides easy to use features and it's still very popular among web developers. And, if you are an AngularJS developer,...
Read more >
jQuery UI Datepicker with AngularJS - CodePen
Adding Classes. In CodePen, whatever you write in the HTML editor is what goes within the <body> tags in a basic HTML5 template....
Read more >
AngularJS in jQuery DatePicker Widget Demo | Kendo UI for ...
The Kendo UI DatePicker features inborn integration with AngularJS using directives which are officially supported as part of the product.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found