mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-5085] Adding possibility to search for future dates search-date-range component (#5525)
* [ADF-5085] Remove maxDate and set the max of the from date to the to date * [ADF-5085] Add maxDate optional setting * [ADF-5085] Add unit test for maxDate * [ADF-5085] Add documentation for maxDate setting * [ADF-5085] Unit tests for default and today value * [ADF-5085] Refactor
This commit is contained in:
@@ -39,6 +39,7 @@ Implements a date range [widget](../../../lib/testing/src/lib/core/pages/form/wi
|
||||
| ---- | ---- | ----------- |
|
||||
| field | string | Field to apply the query to. Required value |
|
||||
| dateFormat | string | Date format. Dates used by the datepicker are [Moment.js](https://momentjs.com/docs/#/parsing/string-format/) instances, so you can use any date format supported by Moment. Default is 'DD/MM/YYYY'. |
|
||||
| maxDate | string | A fixed date or the string `"today"` that will set the maximum searchable date. Default is no maximum. |
|
||||
|
||||
## Details
|
||||
|
||||
@@ -50,7 +51,7 @@ in a search query.
|
||||
|
||||
You can set the date range picker to work with any date format your app requires. You can use
|
||||
any date format supported by [Moment.js](https://momentjs.com/docs/#/parsing/string-format/)
|
||||
in the `dateFormat` setting:
|
||||
in the `dateFormat` and in the `maxDate` setting:
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -64,7 +65,8 @@ in the `dateFormat` setting:
|
||||
"selector": "date-range",
|
||||
"settings": {
|
||||
"field": "cm:created",
|
||||
"dateFormat": "DD-MMM-YY"
|
||||
"dateFormat": "DD-MMM-YY",
|
||||
"maxDate": "02-Mar-20"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user