summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorMichiK <6341204+der-michik@users.noreply.github.com>2018-12-04 21:03:32 +0100
committerMichiK <6341204+der-michik@users.noreply.github.com>2018-12-04 21:03:32 +0100
commit4e3232e57a1b8afde5aa71fb3b1bfd70fcf6ff92 (patch)
tree70af265ca515fdbbd8f73e00f394cf6711ac568e /includes
parent36b7f8d2a2c732725c8993e1df16d454c0e9d47c (diff)
Replace datepicker and remove datepicker inline JS
Diffstat (limited to 'includes')
-rw-r--r--includes/sys_form.php15
1 files changed, 1 insertions, 14 deletions
diff --git a/includes/sys_form.php b/includes/sys_form.php
index b5a957c0..3c31f43e 100644
--- a/includes/sys_form.php
+++ b/includes/sys_form.php
@@ -72,23 +72,10 @@ function form_date($name, $label, $value, $start_date = '', $end_date = '')
$shortLocale = substr($locale, 0, 2);
return form_element($label, '
- <div class="input-group date" id="' . $dom_id . '">
+ <div class="input-group date" id="' . $dom_id . '" data-locale="' . $shortLocale . '" data-min-date="' . $start_date . '" data-max-date="' . $end_date . '">
<input type="date" placeholder="YYYY-MM-DD" name="' . $name . '" class="form-control" value="' . htmlspecialchars($value) . '">'
. '<span class="input-group-addon">' . glyph('th') . '</span>
</div>
- <script type="text/javascript">
- $(function(){
- $("#' . $dom_id . '").children("input").attr("type", "text");
- $("#' . $dom_id . '").datepicker({
- language: "' . $shortLocale . '",
- todayBtn: "linked",
- format: "yyyy-mm-dd",
- startDate: "' . $start_date . '",
- endDate: "' . $end_date . '",
- orientation: "bottom"
- });
- });
- </script>
', $dom_id);
}