Skip to content

Commit

Permalink
Pretty jquery datepicker
Browse files Browse the repository at this point in the history
  • Loading branch information
gologames committed Dec 3, 2019
1 parent a240066 commit 6b94bbe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/jquery-ui-datepicker.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
function init(Survey, $) {

$ = $ || window.$;
if (!$.fn.bootstrapDP && !!$.fn.datepicker && !!$.fn.datepicker.noConflict) {
$.fn.bootstrapDP = $.fn.datepicker.noConflict();
Expand Down Expand Up @@ -44,8 +43,8 @@ function init(Survey, $) {
onSetValue: function(obj, value, jsonConv) {
var newValue = value || "/";
if(!!obj.shortDateFormat) {
var regex = new RegExp(obj.dateSeparator, 'g');
obj.shortDateFormat = obj.shortDateFormat.replace(regex, newValue);
var regex = new RegExp(obj.dateSeparator, "g");
obj.shortDateFormat = obj.shortDateFormat.replace(regex, newValue);
}
obj.setPropertyValue("dateSeparator", newValue);
},
Expand Down

0 comments on commit 6b94bbe

Please sign in to comment.