-
Notifications
You must be signed in to change notification settings - Fork 137
[WIP] Eonasdan datetimepicker update v4.7.14 #149
Conversation
'dp_use_current' => true, | ||
'dp_min_date' => '1/1/1900', | ||
'dp_max_date' => null, | ||
'dp_show_today' => true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we cannot remove the value, we need to be BC compatible. Just convert the values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean I have to keep using the option dp_show_today
and convert it to dp_show_today_button
?
What about the removed options dp_use_minutes
, dp_use_seconds
and dp_pick_time
?
ping @rande, could you give some more details about my question, so I can finish this PR. |
With the current $formMapper
->add('bundleStatus', 'sonata_type_datetime_picker', array(
'dp_side_by_side' => true,
'dp_use_seconds' => false
)); The generated html includes the option but set to jQuery(function ($) {
$('#dtp_s5512b911e3621_bundleStatus').datetimepicker({"pickTime":true,"useCurrent":true,"minDate":"1\/1\/1900","maxDate":null,"showToday":true,"language":"de","defaultDate":"","disabledDates":[],"enabledDates":[],"icons":{"time":"glyphicon glyphicon-time","date":"glyphicon glyphicon-calendar","up":"glyphicon glyphicon-chevron-up","down":"glyphicon glyphicon-chevron-down"},"useStrict":false,"daysOfWeekDisabled":[],"useMinutes":true,"minuteStepping":1,"sideBySide":true,"useSeconds":true});
}); I guess this issue is no longer relevant when this PR is merged @nlzet ? |
@webdevilopers Hmm you are right, this option is always automatically set, so specifying it has no use. But options like I will make an update so the renamed options will be transformed to the new options. |
Thanks @nlzet . When using the time format instead will a data transformer automatically add seconds as |
@webdevilopers, the format is now correctly set on the datepicker. I think this library will create BC issues because the datepicker and datetimepicker now actually are the same, the type no longer defines whether to use time or not. Should I continue? Also there is a version 4.0.0 and 4.7.14 of the plugin, I now updated it to the second one. Do you have an idea how sonata works with the locale of a date? In my current implementation, when using dp_locale "nl" it fails to save some dates |
To be honest I have no idea. I guess @rande can tell you. |
what is the status of this PR ? I have issue with actuel one too. |
Well I didn't continue and I don't know if I should. There are new features but there are a lot of BC issues. Maybe this should be targeted for a new version. What do you think @rande ? |
Indeed. Should be a new major (e.g. 3.0). @nlzet no possibility to keep BC with a deprecation system? |
@soullivaneuh no, I don't think it is possible, I tried but I kept going into new BC problems. I think it is wiser to wait for 3.0. |
@nlzet well, we'll ping you when a major branch will be started. 👍 Please see: sonata-project/SonataAdminBundle#3053 |
Can one of the admins verify this patch? |
@rande, @soullivaneuh I saw there are currently some milestones awaiting for a new 2.4 release for the SonataAdminBundle: https://github.com/sonata-project/SonataAdminBundle/milestones/2.4 I'm unsure but on this issue we said we would wait for version 3.0 on the core bundle, is the 3.0 core version related to the 2.4 release of the admin bundle or will this be in a later stadium ? |
No. 3.0 will be shipped when we will have to introduce BC break. Version constraint are not defined in advance AFAIK. |
Okay, clear. Just ping me when this day comes. |
Fixes #219 |
@nlzet can you please change the docs and add the BC break stuff to the UPGRADE.md? Thank you very much |
@OskarStark I will look into this, probably next week or after. I see that there are already some new versions and features in the eonasdan-datetimepicker, and also there is a work in progress for a new major release. Probably worth looking a little bit deeper to see what is actually going on and what could be useful for Sonata. Is there a release date target for this PR / the 3.0 milestone? |
glad to hear that @nlzet not yet, but we would like to tag the next next MINOR, and after that we will tag the next major too thank you 👍 |
'dp_disabled_dates' => false, | ||
'dp_enabled_dates' => false, | ||
'dp_icons' => array( | ||
'time' => 'glyphicon glyphicon-time', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like glyphicon was replaced by font-awesome
Please rebase and fill the needs tags. |
Please rebase and use the new PR template @nlzet |
@soullivaneuh @core23 sorry for the delay. I'm going to plan some time for this. I'm wondering, since this is outdated and has been under discussion because of BC breaks. Which branch should I target for this feature ? (Probably need a new PR ?) |
If you can handle this without a BC break, you should target the |
@core23 at the time it wasn't possible without BC, but I'll have to re-investige the options of the latest version of eonasdan-datepicker, maybe it is possible now. Thanks anyway |
Can you have a look at this @nlzet ? |
Please update or close this @nlzet |
Sorry @core23, |
See #138 for the previous conversation. Here is a table the datepicker option changes
dp_max_date
null
tofalse
dp_default_date
''
tofalse
dp_disabled_dates
array()
tofalse
dp_enabled_dates
array()
tofalse
dp_icons
previous
,next
,today
andclear
dp_show_today
dp_show_today_button
dp_language
dp_locale
dp_minute_stepping
dp_stepping
dp_use_minutes
dp_use_seconds
dp_pick_time
For the
dp_pick_time
I now used the $this->getName() check to enable/disable the time picker. I think this shouldn't be defined by an option, but by the form type ?