Allow date picker for browsers that do not support it natively. See issue #535

This commit is contained in:
James Cole
2017-01-15 20:05:40 +01:00
parent e9f2121667
commit c3fdd3b5f7
14 changed files with 47 additions and 6 deletions

View File

@@ -20,6 +20,14 @@ $(document).ready(function () {
updateDescription();
}
if (!Modernizr.inputtypes.date) {
$('input[type="date"]').datepicker(
{
dateFormat: 'yy-mm-dd'
}
);
}
// get JSON things:
getJSONautocomplete();

View File

@@ -10,7 +10,15 @@
$(document).ready(function () {
"use strict";
// no special JS for edit transaction.
// give date a datepicker if not natively supported.
if (!Modernizr.inputtypes.date) {
$('input[type="date"]').datepicker(
{
dateFormat: 'yy-mm-dd'
}
);
}
// the destination account name is always an expense account name.
if ($('input[name="destination_account_name"]').length > 0) {
@@ -32,7 +40,9 @@ $(document).ready(function () {
var opt = {
typeahead: {
source: data,
afterSelect: function(val) { this.$element.val(""); }
afterSelect: function (val) {
this.$element.val("");
}
}
};
$('input[name="tags"]').tagsinput(