feat(blocks): Fix disableDates in date selector schemas.

This commit is contained in:
Gervwyk 2021-02-03 12:31:10 +02:00
parent 9a79743174
commit b2763ee205
6 changed files with 218 additions and 28 deletions

View File

@ -33,20 +33,59 @@
"description": "Disable specific dates so that they can not be chosen.",
"properties": {
"min": {
"oneOf": [{ "type": "string" }, { "type": "object" }],
"description": "Disable all dates less than the minimum date. Can be a date string or a _date object."
"type": ["string", "object"],
"description": "Disable all dates less than the minimum date. Can be a date string or a _date object.",
"docs": {
"displayType": "date"
}
},
"max": {
"oneOf": [{ "type": "string" }, { "type": "object" }],
"description": "Disable all dates greater than the maximum date. Can be a date string or a _date object."
"type": ["string", "object"],
"description": "Disable all dates greater than the maximum date. Can be a date string or a _date object.",
"docs": {
"displayType": "date"
}
},
"dates": {
"type": "array",
"description": "Array of specific dates to be disabled. Can be date strings or a _date objects."
"description": "Array of specific dates to be disabled. Can be date strings or a _date objects.",
"items": {
"oneOf": [
{
"type": "string",
"description": "Specific dates to be disabled. "
},
{
"type": "object",
"description": "Specific dates to be disabled. ",
"docs": {
"displayType": "date"
}
}
]
}
},
"ranges": {
"type": "array",
"description": "Array of array pairs of start and end dates be disabled. Can be date strings or a _date objects."
"description": "Array of array pairs of start and end dates be disabled. Can be date strings or a _date objects.",
"items": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string",
"description": "Specific dates to be disabled. "
},
{
"type": "object",
"description": "Specific dates to be disabled. ",
"docs": {
"displayType": "date"
}
}
]
}
}
}
}
},

View File

@ -36,23 +36,56 @@
"type": ["string", "object"],
"description": "Disable all dates less than the minimum date. Can be a date string or a _date object.",
"docs": {
"displayType": "string"
"displayType": "date"
}
},
"max": {
"type": ["string", "object"],
"description": "Disable all dates greater than the maximum date. Can be a date string or a _date object.",
"docs": {
"displayType": "string"
"displayType": "date"
}
},
"dates": {
"type": "array",
"description": "Array of specific dates to be disabled. Can be date strings or a _date objects."
"description": "Array of specific dates to be disabled. Can be date strings or a _date objects.",
"items": {
"oneOf": [
{
"type": "string",
"description": "Specific dates to be disabled. "
},
{
"type": "object",
"description": "Specific dates to be disabled. ",
"docs": {
"displayType": "date"
}
}
]
}
},
"ranges": {
"type": "array",
"description": "Array of array pairs of start and end dates be disabled. Can be date strings or a _date objects."
"description": "Array of array pairs of start and end dates be disabled. Can be date strings or a _date objects.",
"items": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string",
"description": "Specific dates to be disabled. "
},
{
"type": "object",
"description": "Specific dates to be disabled. ",
"docs": {
"displayType": "date"
}
}
]
}
}
}
}
},

View File

@ -33,20 +33,59 @@
"description": "Disable specific dates so that they can not be chosen.",
"properties": {
"min": {
"anyOf": [{ "type": "string" }, { "type": "object" }],
"description": "Disable all dates less than the minimum date. Can be a date string or a _date object."
"type": ["string", "object"],
"description": "Disable all dates less than the minimum date. Can be a date string or a _date object.",
"docs": {
"displayType": "date"
}
},
"max": {
"anyOf": [{ "type": "string" }, { "type": "object" }],
"description": "Disable all dates greater than the maximum date. Can be a date string or a _date object."
"type": ["string", "object"],
"description": "Disable all dates greater than the maximum date. Can be a date string or a _date object.",
"docs": {
"displayType": "date"
}
},
"dates": {
"type": "array",
"description": "Array of specific dates to be disabled. Can be date strings or a _date objects."
"description": "Array of specific dates to be disabled. Can be date strings or a _date objects.",
"items": {
"oneOf": [
{
"type": "string",
"description": "Specific dates to be disabled. "
},
{
"type": "object",
"description": "Specific dates to be disabled. ",
"docs": {
"displayType": "date"
}
}
]
}
},
"ranges": {
"type": "array",
"description": "Array of array pairs of start and end dates be disabled. Can be date strings or a _date objects."
"description": "Array of array pairs of start and end dates be disabled. Can be date strings or a _date objects.",
"items": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string",
"description": "Specific dates to be disabled. "
},
{
"type": "object",
"description": "Specific dates to be disabled. ",
"docs": {
"displayType": "date"
}
}
]
}
}
}
}
},

View File

@ -33,20 +33,59 @@
"description": "Disable specific dates so that they can not be chosen.",
"properties": {
"min": {
"anyOf": [{ "type": "string" }, { "type": "object" }],
"description": "Disable all dates less than the minimum date. Can be a date string or a _date object."
"type": ["string", "object"],
"description": "Disable all dates less than the minimum date. Can be a date string or a _date object.",
"docs": {
"displayType": "date"
}
},
"max": {
"anyOf": [{ "type": "string" }, { "type": "object" }],
"description": "Disable all dates greater than the maximum date. Can be a date string or a _date object."
"type": ["string", "object"],
"description": "Disable all dates greater than the maximum date. Can be a date string or a _date object.",
"docs": {
"displayType": "date"
}
},
"dates": {
"type": "array",
"description": "Array of specific dates to be disabled. Can be date strings or a _date objects."
"description": "Array of specific dates to be disabled. Can be date strings or a _date objects.",
"items": {
"oneOf": [
{
"type": "string",
"description": "Specific dates to be disabled. "
},
{
"type": "object",
"description": "Specific dates to be disabled. ",
"docs": {
"displayType": "date"
}
}
]
}
},
"ranges": {
"type": "array",
"description": "Array of array pairs of start and end dates be disabled. Can be date strings or a _date objects."
"description": "Array of array pairs of start and end dates be disabled. Can be date strings or a _date objects.",
"items": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string",
"description": "Specific dates to be disabled. "
},
{
"type": "object",
"description": "Specific dates to be disabled. ",
"docs": {
"displayType": "date"
}
}
]
}
}
}
}
},

View File

@ -123,6 +123,7 @@
},
"editing": {
"type": "boolean",
"default": false,
"description": "Control editing state."
},
"maxLength": {

View File

@ -33,20 +33,59 @@
"description": "Disable specific dates so that they can not be chosen.",
"properties": {
"min": {
"anyOf": [{ "type": "string" }, { "type": "object" }],
"description": "Disable all dates less than the minimum date. Can be a date string or a _date object."
"type": ["string", "object"],
"description": "Disable all dates less than the minimum date. Can be a date string or a _date object.",
"docs": {
"displayType": "date"
}
},
"max": {
"anyOf": [{ "type": "string" }, { "type": "object" }],
"description": "Disable all dates greater than the maximum date. Can be a date string or a _date object."
"type": ["string", "object"],
"description": "Disable all dates greater than the maximum date. Can be a date string or a _date object.",
"docs": {
"displayType": "date"
}
},
"dates": {
"type": "array",
"description": "Array of specific dates to be disabled. Can be date strings or a _date objects."
"description": "Array of specific dates to be disabled. Can be date strings or a _date objects.",
"items": {
"oneOf": [
{
"type": "string",
"description": "Specific dates to be disabled. "
},
{
"type": "object",
"description": "Specific dates to be disabled. ",
"docs": {
"displayType": "date"
}
}
]
}
},
"ranges": {
"type": "array",
"description": "Array of array pairs of start and end dates be disabled. Can be date strings or a _date objects."
"description": "Array of array pairs of start and end dates be disabled. Can be date strings or a _date objects.",
"items": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string",
"description": "Specific dates to be disabled. "
},
{
"type": "object",
"description": "Specific dates to be disabled. ",
"docs": {
"displayType": "date"
}
}
]
}
}
}
}
},