diff --git a/core/date_api.php b/core/date_api.php
index 2ea2673507..cefad649db 100644
--- a/core/date_api.php
+++ b/core/date_api.php
@@ -243,7 +243,7 @@ function print_date_selection_set( $p_name, $p_format, $p_date = 0, $p_default_d
$t_disable = '';
if( $p_default_disable == true ) {
- $t_disable = ' readonly="readonly"';
+ $t_disable = ' disabled="disabled"';
}
$t_blank_line = '';
if( $p_allow_blank == true ) {
diff --git a/core/filter_constants_inc.php b/core/filter_constants_inc.php
index 0d947d0e6c..37ffd1cfa8 100644
--- a/core/filter_constants_inc.php
+++ b/core/filter_constants_inc.php
@@ -40,8 +40,6 @@
define( 'FILTER_PROPERTY_DATE_SUBMITTED_END_MONTH', 'end_month' );
define( 'FILTER_PROPERTY_DATE_SUBMITTED_END_YEAR', 'end_year' );
define( 'FILTER_PROPERTY_FILTER_BY_DATE_SUBMITTED', 'filter_by_date' ); #do_filter_by_date
-define( 'FILTER_PROPERTY_FILTER_BY_START_DATE_SUBMITTED', 'filter_by_start_date' );
-define( 'FILTER_PROPERTY_FILTER_BY_END_DATE_SUBMITTED', 'filter_by_end_date' );
define( 'FILTER_PROPERTY_LAST_UPDATED_START_DAY', 'last_updated_start_day' );
define( 'FILTER_PROPERTY_LAST_UPDATED_START_MONTH', 'last_updated_start_month' );
@@ -50,8 +48,6 @@
define( 'FILTER_PROPERTY_LAST_UPDATED_END_MONTH', 'last_updated_end_month' );
define( 'FILTER_PROPERTY_LAST_UPDATED_END_YEAR', 'last_updated_end_year' );
define( 'FILTER_PROPERTY_FILTER_BY_LAST_UPDATED_DATE', 'filter_by_last_updated_date' ); #do_filter_by_last_updated_date
-define( 'FILTER_PROPERTY_FILTER_BY_LAST_UPDATED_START_DATE', 'filter_by_last_updated_start_date' );
-define( 'FILTER_PROPERTY_FILTER_BY_LAST_UPDATED_END_DATE', 'filter_by_last_updated_end_date' );
define( 'FILTER_PROPERTY_RELATIONSHIP_TYPE', 'relationship_type' );
define( 'FILTER_PROPERTY_RELATIONSHIP_BUG', 'relationship_bug' );
diff --git a/core/filter_form_api.php b/core/filter_form_api.php
index 9eae567b07..5869162c92 100644
--- a/core/filter_form_api.php
+++ b/core/filter_form_api.php
@@ -1307,7 +1307,7 @@ function print_filter_do_filter_by_date( $p_hide_checkbox = false, array $p_filt
@@ -1318,14 +1318,26 @@ function print_filter_do_filter_by_date( $p_hide_checkbox = false, array $p_filt
- ';
- echo '';
- ?>
+ ';
+ print_month_option_list( $p_filter[FILTER_PROPERTY_DATE_SUBMITTED_START_MONTH] );
+ print "\n";
+ }
+ if( strcasecmp( $t_char, 'D' ) == 0 ) {
+ echo '\n";
+ }
+ if( strcasecmp( $t_char, 'Y' ) == 0 ) {
+ echo '\n";
+ }
+ }
+ ?>
|
@@ -1334,14 +1346,26 @@ function print_filter_do_filter_by_date( $p_hide_checkbox = false, array $p_filt
- ';
- echo '';
- ?>
+ ';
+ print_month_option_list( $p_filter[FILTER_PROPERTY_DATE_SUBMITTED_END_MONTH] );
+ print "\n";
+ }
+ if( strcasecmp( $t_char, 'D' ) == 0 ) {
+ echo '\n";
+ }
+ if( strcasecmp( $t_char, 'Y' ) == 0 ) {
+ echo '\n";
+ }
+ }
+ ?>
|
@@ -1418,7 +1442,7 @@ function print_filter_do_filter_by_last_updated_date( $p_hide_checkbox = false,
?>
@@ -1435,7 +1459,7 @@ function print_filter_do_filter_by_last_updated_date( $p_hide_checkbox = false,
@@ -1446,14 +1470,26 @@ function print_filter_do_filter_by_last_updated_date( $p_hide_checkbox = false,
- ';
- echo '';
- ?>
+ ';
+ print_month_option_list( $p_filter[FILTER_PROPERTY_LAST_UPDATED_START_MONTH] );
+ print "\n";
+ }
+ if( strcasecmp( $t_char, 'D' ) == 0 ) {
+ echo '\n";
+ }
+ if( strcasecmp( $t_char, 'Y' ) == 0 ) {
+ echo '\n";
+ }
+ }
+ ?>
|
@@ -1462,14 +1498,26 @@ function print_filter_do_filter_by_last_updated_date( $p_hide_checkbox = false,
- ';
- echo '';
- ?>
+ ';
+ print_month_option_list( $p_filter[FILTER_PROPERTY_LAST_UPDATED_END_MONTH] );
+ print "\n";
+ }
+ if( strcasecmp( $t_char, 'D' ) == 0 ) {
+ echo '\n";
+ }
+ if( strcasecmp( $t_char, 'Y' ) == 0 ) {
+ echo '\n";
+ }
+ }
+ ?>
|
diff --git a/js/common.js b/js/common.js
index 254d502062..41b04932a6 100644
--- a/js/common.js
+++ b/js/common.js
@@ -136,9 +136,6 @@ $(document).ready( function() {
context: $('#' + targetID),
success: function(html) {
$(this).html(html);
- $(this).find('input[type=text].datetimepicker').each(function(index, element) {
- enableDatTimePicker(this);
- });
},
error: function(obj,status,error) {
$(this).html('' + status + ': ' + error + '');
@@ -228,7 +225,24 @@ $(document).ready( function() {
});
$('input[type=text].datetimepicker').each(function(index, element) {
- enableDatTimePicker(this);
+ $(this).datetimepicker({
+ locale: $(this).data('picker-locale'),
+ format: $(this).data('picker-format'),
+ useCurrent: false,
+ 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 ) {
@@ -268,7 +282,7 @@ $(document).ready( function() {
$(document).on('change', '.js_switch_date_inputs_trigger', function() {
$(this).closest('table')
.find('select')
- .prop('readonly', !$(this).prop('checked'));
+ .prop('disabled', !$(this).prop('checked'));
});
/* Handle custom field of date type */
@@ -276,8 +290,8 @@ $(document).ready( function() {
var table = $(this).closest('table');
switch(this.value) {
case '2': // between
- $(table).find("input[name*=_start_date]").prop('readonly', false);
- $(table).find("input[name*=_end_date]").prop('readonly', false);
+ $(table).find("input[name*=_start_date]").prop('disabled', false);
+ $(table).find("input[name*=_end_date]").prop('disabled', false);
break;
case '3': // on or before
@@ -285,15 +299,15 @@ $(document).ready( function() {
case '5': // on
case '6': // after
case '7': // on or after
- $(table).find("input[name*=_start_date]").prop('readonly', false);
- $(table).find("input[name*=_end_date]").prop('readonly', true);
+ $(table).find("input[name*=_start_date]").prop('disabled', false);
+ $(table).find("input[name*=_end_date]").prop('disabled', true);
break;
case '0': // any
case '1': // none
default:
- $(table).find("input[name*=_start_date]").prop('readonly', true);
- $(table).find("input[name*=_end_date]").prop('readonly', true);
+ $(table).find("input[name*=_start_date]").prop('disabled', true);
+ $(table).find("input[name*=_end_date]").prop('disabled', true);
break;
}
});
@@ -455,28 +469,6 @@ function toggleDisplay(idTag)
setDisplay( idTag, (document.getElementById(idTag).style.display == 'none')?1:0 );
}
-// Datetime picker handler
-function enableDatTimePicker( p_element ) {
- $(p_element).datetimepicker({
- locale: $(p_element).data('picker-locale'),
- format: $(p_element).data('picker-format'),
- useCurrent: false,
- 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();
- });
-}
-
// Dropzone handler
Dropzone.autoDiscover = false;
function enableDropzone( classPrefix, autoUpload ) {