Skip to content

Commit

Permalink
fix updateAirDateInput selected value
Browse files Browse the repository at this point in the history
  • Loading branch information
pvictor committed Apr 17, 2024
1 parent 72c86f4 commit 93a3166
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: shinyWidgets
Title: Custom Inputs Widgets for Shiny
Version: 0.8.5
Version: 0.8.5.9000
Authors@R: c(
person("Victor", "Perrier", email = "victor.perrier@dreamrs.fr", role = c("aut", "cre", "cph")),
person("Fanny", "Meyer", role = "aut"),
Expand Down
2 changes: 1 addition & 1 deletion inst/packer/air-datepicker.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions srcjs/inputs/air-datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,6 @@ $.extend(AirDatepickerBindings, {

dp.update(options);

if (data.hasOwnProperty("value")) AirDatepickerBindings.setValue(el, data.value);

if (options.hasOwnProperty("startView")) {
dp.date = as_date(options.startView);
}
Expand All @@ -316,6 +314,8 @@ $.extend(AirDatepickerBindings, {
$("#" + data.id)[0].placeholder = data.placeholder;
}

if (data.hasOwnProperty("value")) AirDatepickerBindings.setValue(el, data.value);

$(el).trigger("change");
}
});
Expand Down

0 comments on commit 93a3166

Please sign in to comment.