From 7fcdf75a61097c35352e3953b94942ac00613489 Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Tue, 16 Jan 2018 00:38:08 -0500 Subject: [PATCH] Allow the dashboard edit-item date picker to select the month and year via dropdown, and clean up the styles on mobile --- resources/assets/js/dashboard.js | 4 +++- resources/assets/sass/dashboard.scss | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/resources/assets/js/dashboard.js b/resources/assets/js/dashboard.js index 9051a46..7b0d7d3 100644 --- a/resources/assets/js/dashboard.js +++ b/resources/assets/js/dashboard.js @@ -406,7 +406,9 @@ function editItemInit() { $(this).pickadate({ format: "yyyy-mm-dd", formatSubmit: "yyyy-mm-dd", - clear: false + clear: false, + selectYears: true, + selectMonths: true }); }); diff --git a/resources/assets/sass/dashboard.scss b/resources/assets/sass/dashboard.scss index e3d0af6..767dd63 100644 --- a/resources/assets/sass/dashboard.scss +++ b/resources/assets/sass/dashboard.scss @@ -350,6 +350,22 @@ body { .picker__holder { overflow-y: hidden; + + .picker__button--today { + white-space: nowrap; + } + + .picker__select--year, .picker__select--month, .picker__month, .picker__day, .picker__weekday, .picker__footer { + @media (max-width: $screen-xs-max) { + font-size: 16px; + } + } + + .picker__select--year, .picker__select--month { + width: auto; + height: 1.5em; + padding: 0px; + } } label {