Added Calendar Icon to DateTime field

This commit is contained in:
Djamil Legato
2016-02-08 15:42:33 -08:00
parent 6271eeddff
commit d6d6afdabf
5 changed files with 19 additions and 3 deletions

View File

@@ -40,6 +40,7 @@ export default class DateTimeField {
let options = Object.assign({}, this.options, list.data('grav-datetime') || {});
list.datetimepicker(options).on('dp.show dp.update', this._disableDecades);
list.siblings('.field-icons').on('click', () => list.mousedown().focus());
}
_onAddedNodes(event, target/* , record, instance */) {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,3 +1,18 @@
.datetime-picker-wrapper {
position: relative;
input {
padding-right: 2.5rem;
}
.field-icons {
position: absolute;
top: 0;
right: 10px;
bottom: 0;
line-height: 2.5rem;
}
}
.collapse {
display: none;
&.in {