Closed (fixed)
Project:
Bootstrap DateTime Picker
Version:
8.x-1.2
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
2 Apr 2019 at 13:19 UTC
Updated:
28 Sep 2020 at 06:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
prashant.c@eahonet
Thanks for raising this issue. It would be great to have this feature in this module.
I will try to work on the same but any patches are also welcome.
Cheers!!
Comment #3
Kavya_akhil commented@eahonet, @prashantc,
Here is the patch which has BootstrapDateRangeWidget plugin added.
Comment #4
Kavya_akhil commentedComment #5
davemybes commentedJust stumbled across this today and gave it a go. Works well for me and composer had no issue applying the patch. Nice work!
The only issue was that my default values for date and time (set via a form_alter) got overwritten. Not sure if that's something specific to this patch, or the module in general.
Comment #6
JThan commentedI get the following error after installen the patch via composer and choosing the bootstrap datepciker for a daterange date field.
Still investigating what this could be.
EDIT: To solve this i had to put the following line:
use Drupal\datetime\Plugin\Field\FieldType\DateTimeItem;into:
/bootstrap_datetime_picker/src/Plugin/Field/FieldWidget/BootstrapDateRangeWidget.php
ERROR:
Comment #7
JThan commentedI added my change in an additional patch, whch you have to add after you added the patch from comment 3.
Comment #8
JThan commentedAnd here I combined both patches. Hope this works.
Comment #9
JThan commentedComment #10
JThan commentedComment #11
JThan commentedComment #13
prashant.cThanks to all the contributors for your efforts. It is a very good feature to be added to this module.