This repository has been archived by the owner on Sep 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 137
[WIP] Eonasdan datetimepicker update v4.7.14 #149
Closed
Closed
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
4ef11b6
Update eonasdan-bootstrap-datetimepicker to v4.0.0
59c097e
Update datepicker form types to use bootstrap-datetimepicker v4.0.0
6bbde31
Improve form types documentation according to the bootstrap-datetimep…
0625b6f
new options dp_calendar_week and dp_view_mode
25e5faa
fix moment format
05b573f
new options + use set locale
8623ecd
update datepicker to 4.7.14
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,14 +48,11 @@ public function finishView(FormView $view, FormInterface $form, array $options) | |
if (isset($options['date_format']) && is_string($options['date_format'])) { | ||
$format = $options['date_format']; | ||
} elseif (is_int($format)) { | ||
$timeFormat = ($options['dp_pick_time']) ? DateTimeType::DEFAULT_TIME_FORMAT : \IntlDateFormatter::NONE; | ||
$timeFormat = ($this->getName() == 'sonata_type_datetime_picker') ? DateTimeType::DEFAULT_TIME_FORMAT : \IntlDateFormatter::NONE; | ||
$intlDateFormatter = new \IntlDateFormatter(\Locale::getDefault(), $format, $timeFormat, null, \IntlDateFormatter::GREGORIAN, null); | ||
$format = $intlDateFormatter->getPattern(); | ||
} | ||
|
||
// use seconds if it's allowe in format | ||
$options['dp_use_seconds'] = strpos($format, 's') !== false; | ||
|
||
$view->vars['moment_format'] = $this->formatConverter->convert($format); | ||
|
||
$view->vars['type'] = 'text'; | ||
|
@@ -87,20 +84,23 @@ protected function getCommonDefaults() | |
return array( | ||
'widget' => 'single_text', | ||
'datepicker_use_button' => true, | ||
'dp_pick_time' => true, | ||
'dp_use_current' => true, | ||
'dp_min_date' => '1/1/1900', | ||
'dp_max_date' => null, | ||
'dp_show_today' => true, | ||
'dp_language' => \Locale::getDefault(), // 'en' | ||
'dp_default_date' => '', | ||
'dp_disabled_dates' => array(), | ||
'dp_enabled_dates' => array(), | ||
'dp_max_date' => false, | ||
'dp_show_today_button' => true, | ||
'dp_locale' => \Locale::getDefault(), // 'en' | ||
'dp_default_date' => false, | ||
'dp_disabled_dates' => false, | ||
'dp_enabled_dates' => false, | ||
'dp_icons' => array( | ||
'time' => 'glyphicon glyphicon-time', | ||
'date' => 'glyphicon glyphicon-calendar', | ||
'up' => 'glyphicon glyphicon-chevron-up', | ||
'down' => 'glyphicon glyphicon-chevron-down', | ||
'time' => 'glyphicon glyphicon-time', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. looks like glyphicon was replaced by font-awesome |
||
'date' => 'glyphicon glyphicon-calendar', | ||
'up' => 'glyphicon glyphicon-chevron-up', | ||
'down' => 'glyphicon glyphicon-chevron-down', | ||
'previous' => 'glyphicon glyphicon-chevron-left', | ||
'next' => 'glyphicon glyphicon-chevron-right', | ||
'today' => 'glyphicon glyphicon-screenshot', | ||
'clear' => 'glyphicon glyphicon-trash', | ||
), | ||
'dp_use_strict' => false, | ||
'dp_side_by_side' => false, | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
2 changes: 1 addition & 1 deletion
2
Resources/public/vendor/eonasdan-bootstrap-datetimepicker/LICENSE
This file contains 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
18 changes: 13 additions & 5 deletions
18
Resources/public/vendor/eonasdan-bootstrap-datetimepicker/README.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,25 @@ | ||
# Bootstrap v3 datetimepicker widget ![GitHub version](https://badge.fury.io/gh/Eonasdan%2Fbootstrap-datetimepicker.png) ![Travis](https://travis-ci.org/Eonasdan/bootstrap-datetimepicker.svg?branch=development) | ||
# Bootstrap 3 Date/Time Picker | ||
![GitHub version](https://badge.fury.io/gh/Eonasdan%2Fbootstrap-datetimepicker.png) ![Travis](https://travis-ci.org/Eonasdan/bootstrap-datetimepicker.svg?branch=development) | ||
|
||
![DateTimePicker](http://i.imgur.com/nfnvh5g.png) | ||
|
||
## [View the manual and demos](http://eonasdan.github.io/bootstrap-datetimepicker/) | ||
|
||
#v4 | ||
v4 is out now! For v4 related bugs and issues see: /Eonasdan/bootstrap-datetimepicker/labels/v4. | ||
|
||
v3 is going into an archive state. Please be sure to check the documents. v4 has breaking changes and is a major rewrite. | ||
|
||
## Submitting Issues | ||
Please test and/or fork [this jsfiddle](http://jsfiddle.net/kmbo576p/) with an example of your issue before you post an issue here. | ||
If you have issues, please check the following first: | ||
* Have you read the docs? | ||
* Do you have the latest version of momentjs? | ||
* Do you have the latest version of jQuery? | ||
* Please test and/or fork [this jsfiddle](http://jsfiddle.net/Eonasdan/0Ltv25o8/) with an example of your issue before you post an issue here. | ||
|
||
## Where do you use this? | ||
I'd love to know if your public site is using this plugin and list your logo on the documentation site. Please email me `eonasdan at outlook dot com`. Do not submit issue/feature request to this email, they will be ignored. | ||
|
||
## [Installation instructions](https://github.com/Eonasdan/bootstrap-datetimepicker/wiki/Installation) | ||
Installation instructions has been moved to the wiki | ||
|
||
## [Change Log](https://github.com/Eonasdan/bootstrap-datetimepicker/wiki/Change-Log) | ||
The change log has moved to the wiki | ||
## [Change Log](https://github.com/Eonasdan/bootstrap-datetimepicker/wiki/Version-4-changelog) |
8 changes: 5 additions & 3 deletions
8
Resources/public/vendor/eonasdan-bootstrap-datetimepicker/bower.json
This file contains 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 todp_show_today_button
?What about the removed options
dp_use_minutes
,dp_use_seconds
anddp_pick_time
?