From 71334b13bd31c7f5a0c1704584b28274785f95e3 Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Mon, 4 Jun 2018 11:35:02 +0100 Subject: [IMP] web: Expose datepicker configuration to view declarations The lower-level widget itself supports passing options to the underlying datepicker library. However this is not exposed to higher-level view declaration. With this patch, one can declare a field in a view such as: ```xml ``` That option would land in the widget and disable those weekdays. Documentation has been updated accordingly. Closes #25044. --- doc/reference/javascript_reference.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'doc/reference/javascript_reference.rst') diff --git a/doc/reference/javascript_reference.rst b/doc/reference/javascript_reference.rst index b77aa9f5612..3c782ed00a8 100644 --- a/doc/reference/javascript_reference.rst +++ b/doc/reference/javascript_reference.rst @@ -1329,11 +1329,27 @@ order. - Supported field types: *date*, *datetime* + Options: + + - datepicker: extra settings for the datepicker_ widget. + + .. code-block:: xml + + + - datetime (FieldDateTime) This is the default field type for fields of type *datetime*. - Supported field types: *date*, *datetime* + Options: + + - datepicker: extra settings for the datepicker_ widget. + + .. code-block:: xml + + + - monetary (FieldMonetary) This is the default field type for fields of type 'monetary'. It is used to display a currency. If there is a currency fields given in option, it will @@ -1814,4 +1830,6 @@ Relational fields .. _event delegation: http://api.jquery.com/delegate/ +.. _datepicker: https://github.com/Eonasdan/bootstrap-datetimepicker + .. _deferred: http://api.jquery.com/category/deferred-object/ -- cgit v1.2.3