Commit Graph

39 Commits

Author SHA1 Message Date
Nathan van der Werf bc17975634 Remove alias functions 2018-08-15 18:51:25 +02:00
Nathan van der Werf 3a918ad200 Remove "null" assignments 2018-08-15 18:33:24 +02:00
Michał Płodowski 68ee471d39 Add showWeekNumbers option to datepicker (#3637)
Fixes #3634. Credit to @mplodowski
2018-07-12 18:10:24 -04:00
Luke Towers 9565565865 Add ignoreTimezone option to datepicker field and column types.
Adds the ability to specify an `ignoreTimezone: true` option on the config for a datepicker form widget or date column type. This will ignore both October's and the backend user's timezone settings to display the date exactly as it is stored.
2017-09-10 22:39:15 -06:00
Tobias Kündig 4f97d07962 Added firstDay option to datepicker form widget (#2940)
Documented here: https://github.com/octobercms/docs/pull/243
2017-06-28 07:23:59 -06:00
Samuel Georges b841f9e066 {@inheritDoc} -> @inheritDoc 2017-03-16 06:26:14 +11:00
Samuel Georges c9bb4d396e Merge pull request #2573 from sw-double/feature/datepicker-year-range
Support yearRange property for datepicker form field
2017-01-07 12:10:49 +11:00
Konstantin L 15cea23308 Support yearRange property for datepicker field. 2016-12-20 20:21:02 +01:00
Samuel Georges 29040b416c Allow redirect: false on importExportController
Implement getFieldName() method
2016-11-28 07:50:06 +11:00
Samuel Georges 88196fb660 Allow passing an explicit format to datepicker
Refs #1919
Recompile assets
2016-10-20 08:44:14 +11:00
Samuel Georges 1c3631bede Datepicker can use an expressed date for default value
@Carbon::parse was still failing, wrapped in do nothing try/catch instead
We don't seem to need to prefix time values anymore, since DateTimeHelper::makeCarbon should handle it
Fixes #2299
2016-08-13 11:29:01 +10:00
Samuel Georges cb86e655dd Fixes disabled relation nulling value
Just like DatePicker, relation and even regular fields should omitted from the data set
The same logic should apply to hidden fields
Fixes #1827
Recompile assets
2016-05-15 06:47:28 +10:00
Samuel Georges d50c7591cf Move the datepicker to storm
Write docs on usage
2016-05-12 06:48:10 +10:00
Samuel Georges d3efc1af4c Make the datepicker preview mode show pretty dates
Improve styles of preview form controls
2016-04-26 06:59:02 +10:00
Samuel Georges 41fe2407be Add support for TIME db columns
Tacks on todays date so it remains compatible with the datepicker control. Without this, it returns "Invalid date"
2016-04-26 06:18:04 +10:00
Samuel Georges e772e87de5 Complete rebuild of datepicker form widget
The datepicker now handles timezones and locale mainly on the client side. When a user selects a date/time, the value is chosen in their timezone preference, the script will then convert the value to the application timezone (UTC) for storage in the database. The reverse is true: when the value is loaded, it is converted from UTC to the user preference. The entire process is seamless. Dates are also formatted in the locale preference.

Example scenario: This fixes the issue when selecting the blog post published date. In some cases, the date could be set to 24th April but the server time is 23rd April, so the post appears unpublished against the user's intent.

There is still some issues around DATE and TIME column types stored in the database. It is best to always use TIMESTAMP/DATETIME to retain the timezone conversions. DATE will reset the time to 00:00 UTC which can cause issues and TIME does not play nicely with Carbon at all. We should still try to add support for these columns in the datepicker, even though they are not recommended.
2016-04-24 09:33:39 +10:00
Samuel Georges be7b3b3009 Remove the cray defaults on datepicker
Recompile assets
Fixes #1920
2016-04-19 05:59:32 +10:00
jfoliveira 6a897b1072 Datepicker: allow specify display format (#1919)
* Apply datepicker `format` property reading from config.

* Using the format property on partial.
2016-04-19 05:11:40 +10:00
Pásztor Gábor 4af9a374d6 Minor fix in timepicker 2016-01-14 13:17:45 +01:00
Samuel Georges a186a60c43 Fixes the datepicker saving an empty value when disabled
Refs https://github.com/responsiv/campaign-plugin/issues/4
2015-12-09 08:19:53 +11:00
Samuel Georges f2e13ba3eb Simplify #1475 2015-10-17 08:54:40 +11:00
Patrick Ward 20704bca67 Allow minDate/maxDate to be entered in date format for DatePicker. Fixes #909. 2015-09-29 19:02:42 -04:00
Samuel Georges 54e06694da Add trigger api support to datepicker 2015-08-04 20:04:25 +10:00
Samuel Georges b010732796 These methods should be protected, update client lang 2015-08-04 10:01:17 +10:00
Samuel Georges 165d2f86e0 Combine datepicker JS assets, sync z-index for timepicker 2015-02-28 19:32:17 +11:00
Samuel Georges f8ae611ec9 Refactor form widgets to use new fillFromConfig() helper 2015-02-28 14:43:34 +11:00
Samuel Georges 85c47c4e01 public -> protected $defaultAlias 2015-02-28 12:43:53 +11:00
Samuel Georges d91d4112a5 getLoadData -> getLoadValue 2015-01-05 09:45:04 +11:00
Samuel Georges 0be582c42d getSaveData -> getSaveValue 2015-01-05 09:43:39 +11:00
Samuel Georges 85b97c5419 Refs #850 - Minor code clean 2015-01-03 15:48:07 +11:00
Scott Bedard 8286880148 Valid strtotime() format when time is left empty
Date-type laravel validation ("date", "before", and "after") may not be used with datetime widgets containing empty time fields because they are not in a valid strtotime() format (example: 2014-12-27 :00).

This extra check ensures a valid strtotime() format by only adding the ":00" seconds value when a time value is present.
2014-12-27 17:33:27 -05:00
Samuel Georges 3dbe487698 Various fixes to datepicker and form widget 2014-11-27 19:02:23 +11:00
Samuel Georges e6d82bec69 Clean up code from #797, remove conflicts in CSS 2014-11-27 09:44:34 +11:00
webmaxx 7973037d5f Fixes display values for datetime 2014-11-26 13:57:25 +03:00
Samuel Georges 6a8146fa19 Refs #795 - Fixes set values for datetime 2014-11-26 19:02:06 +11:00
Samuel Georges 81a02cea96 Refs #795: Combine TimePicker and DatePicker 2014-11-26 17:57:59 +11:00
Sam Georges c32ba4cbad Minor code clean 2014-11-04 17:41:48 +11:00
Stefan Talen 347dff7e75 Merge branch 'develop' of https://github.com/octobercms/october into feature/PSR-2
Conflicts:
	modules/backend/behaviors/RelationController.php
	modules/backend/classes/WidgetManager.php
	modules/cms/classes/CmsCompoundObject.php
	modules/cms/twig/Extension.php
	modules/cms/twig/PlaceholderNode.php
	modules/cms/widgets/TemplateList.php
2014-10-18 11:07:17 +02:00
Dmitriy d055bbedaa Rename Datepicker.php to DatePicker.php 2014-10-16 22:03:10 +03:00