-
-
Save chicodasilva/cad686d45b2731f2886df97ae410d5cd to your computer and use it in GitHub Desktop.
Drupal :: single_datetime
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/web/modules/contrib/single_datetime/single_datetime.info.yml b/web/modules/contrib/single_datetime/single_datetime.info.yml | |
| index d3ce4fcbf..0456e64b4 100644 | |
| --- a/web/modules/contrib/single_datetime/single_datetime.info.yml | |
| +++ b/web/modules/contrib/single_datetime/single_datetime.info.yml | |
| @@ -5,6 +5,7 @@ description: Date time picker form element using the xdan jQuery Plugin Date and | |
| dependencies: | |
| - drupal:datetime | |
| + - drupal:datetime_range | |
| # Information added by Drupal.org packaging script on 2018-11-25 | |
| version: '8.x-1.7' | |
| diff --git a/web/modules/contrib/single_datetime/src/Plugin/Field/FieldWidget/SingleDateTimeBase.php b/web/modules/contrib/single_datetime/src/Plugin/Field/FieldWidget/SingleDateTimeBase.php | |
| index 5bb9c3084..8e3992d70 100644 | |
| eTimeBase.php | |
| +++ b/web/modules/contrib/single_datetime/src/Plugin/Field/FieldWidget/SingleDateTimeBase.php | |
| @@ -256,7 +256,7 @@ public function massageFormValues(array $values, array $form, FormStateInterface | |
| switch ($this->getFieldSetting('datetime_type')) { | |
| // Dates only. | |
| case DateTimeItem::DATETIME_TYPE_DATE: | |
| - case DateRangeItem::DATETIME_TYPE_DATE: | |
| + case 'date': //DateRangeItem::DATETIME_TYPE_DATE: | |
| // If this is a date-only field, set it to the default time so the | |
| // timezone conversion can be reversed. | |
| datetime_date_default_time($start_date); | |
| @@ -264,7 +264,7 @@ public function massageFormValues(array $values, array $form, FormStateInterface | |
| break; | |
| // All day. | |
| - case DateRangeItem::DATETIME_TYPE_ALLDAY: | |
| + case 'allday': //DateRangeItem::DATETIME_TYPE_ALLDAY: | |
| // All day fields start at midnight on the starting date, but are | |
| // stored like datetime fields, so we need to adjust the time. | |
| // This function is called twice, so to prevent a double conversion |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment