Skip to content

Commit

Permalink
Fix: jquery date picker generates error if jQuery is not included #250
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtelnov committed Apr 27, 2021
1 parent 44345b6 commit 66598e2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/jquery-ui-datepicker.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
function init(Survey, $) {
$ = $ || window.$;
if (!$.fn.bootstrapDP && !!$.fn.datepicker && !!$.fn.datepicker.noConflict) {
if (
!!$ &&
!$.fn.bootstrapDP &&
!!$.fn.datepicker &&
!!$.fn.datepicker.noConflict
) {
$.fn.bootstrapDP = $.fn.datepicker.noConflict();
if (!$.fn.datepicker) {
$.fn.datepicker = $.fn.bootstrapDP;
Expand Down

0 comments on commit 66598e2

Please sign in to comment.