Skip to content

Commit

Permalink
EICNET-2987: Remove code relative to datepicker.
Browse files Browse the repository at this point in the history
  • Loading branch information
arismag committed Mar 13, 2024
1 parent fc59882 commit ed17d12
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 87 deletions.
9 changes: 0 additions & 9 deletions lib/modules/eic_admin/css/custom-datepicker.css

This file was deleted.

22 changes: 0 additions & 22 deletions lib/modules/eic_admin/eic_admin.libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,3 @@ admin_ux:
css:
theme:
css/admin-ux.css: {}

pickadate:
version: 3.6.4
js:
/libraries/pickadate_js/lib/picker.js: {}
/libraries/pickadate_js/lib/picker.date.js: {}
css:
theme:
/libraries/pickadate_js/lib/themes/classic.css: {}
/libraries/pickadate_js/lib/themes/classic.date.css: {}

custom_datepicker:
css:
theme:
css/custom-datepicker.css: {}
js:
js/custom-datepicker.js: {}
dependencies:
- core/jquery
- core/drupal
- core/once
- eic_admin/pickadate
21 changes: 0 additions & 21 deletions lib/modules/eic_admin/eic_admin.module
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,3 @@ function eic_admin_form_alter(array &$form, FormStateInterface $form_state, $for
$form['#attached']['library'][] = 'eic_admin/admin_ux';
}
}

/**
* Implements hook_preprocess_HOOK().
*/
function eic_admin_preprocess_input(&$variables) {

if ($variables['theme_hook_original'] === 'input__date'
&& $variables['element']['#attributes']['type'] === 'date'
&& in_array($variables['element']['#name'], Datepicker::FIELDS_OVERRIDE_DATEPICKER)) {

// Attach custom library and add class identifier to element.
$variables['#attached']['library'][] = 'eic_admin/custom_datepicker';
$variables["attributes"]["class"][] = 'js-datepicker-custom';

// Set custom values for the library.
$variables['attributes']['type'] = 'text';
$variables['attributes']['placeholder'] = 'DD/MM/YYYY';
$variables['attributes']['data-value'] = $variables['attributes']['value'];
}

}
16 changes: 0 additions & 16 deletions lib/modules/eic_admin/js/custom-datepicker.js

This file was deleted.

19 changes: 0 additions & 19 deletions lib/modules/eic_admin/src/Constants/Datepicker.php

This file was deleted.

0 comments on commit ed17d12

Please sign in to comment.