Skip to content

Commit

Permalink
Show datetime picker when clicking calendar icon
Browse files Browse the repository at this point in the history
Fixes #20040
  • Loading branch information
Rafik Robeal authored and dregad committed Dec 20, 2016
1 parent 6f73af1 commit 0c00e73
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bug_change_status_page.php
Expand Up @@ -244,7 +244,7 @@
data-picker-locale="<?php lang_get_current_datetime_locale() ?>"
data-picker-format="<?php echo config_get( 'calendar_js_date_format' ) ?>
<?php helper_get_tab_index() ?> value="<?php echo $t_date_to_display ?>" />
<i class="fa fa-calendar fa-xlg"></i>';
<i class="fa fa-calendar fa-xlg datetimepicker"></i>
</td>
</tr>

Expand Down
4 changes: 4 additions & 0 deletions css/ace-mantis.css
Expand Up @@ -286,6 +286,10 @@ input.datetimepicker {
margin:0 5px 0 0;
}

i.datetimepicker {
cursor: pointer;
}

.bootstrap-datetimepicker-widget.dropdown-menu {
color: #333333;
}
Expand Down
17 changes: 15 additions & 2 deletions js/common.js
Expand Up @@ -212,8 +212,21 @@ $(document).ready( function() {
$('input[type=text].datetimepicker').each(function(index, element) {
$(this).datetimepicker({
locale: $(this).data('picker-locale'),
format: $(this).data('picker-format')
});
format: $(this).data('picker-format'),
icons: {
time: 'fa fa-clock-o',
date: 'fa fa-calendar',
up: 'fa fa-chevron-up',
down: 'fa fa-chevron-down',
previous: 'fa fa-chevron-left',
next: 'fa fa-chevron-right',
today: 'fa fa-arrows ',
clear: 'fa fa-trash',
close: 'fa fa-times'
}
}).next().on(ace.click_event, function() {
$(this).prev().focus();
});
});

if( $( ".dropzone-form" ).length ) {
Expand Down

0 comments on commit 0c00e73

Please sign in to comment.