mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 21:49:25 +08:00
fix: missing date field options with and without timezone in calendar block (#5674)
This commit is contained in:
parent
1d7da5b7d8
commit
34611c6e73
@ -186,7 +186,7 @@ export const calendarBlockSettings = new SchemaSettings({
|
|||||||
return {
|
return {
|
||||||
title: t('Start date field'),
|
title: t('Start date field'),
|
||||||
value: fieldNames.start,
|
value: fieldNames.start,
|
||||||
options: getCollectionFieldsOptions(name, 'date', {
|
options: getCollectionFieldsOptions(name, ['date', 'datetime', 'dateOnly', 'datetimeNoTz', 'unixTimestamp'], {
|
||||||
association: ['o2o', 'obo', 'oho', 'm2o'],
|
association: ['o2o', 'obo', 'oho', 'm2o'],
|
||||||
}),
|
}),
|
||||||
onChange: (start) => {
|
onChange: (start) => {
|
||||||
@ -221,7 +221,7 @@ export const calendarBlockSettings = new SchemaSettings({
|
|||||||
return {
|
return {
|
||||||
title: t('End date field'),
|
title: t('End date field'),
|
||||||
value: fieldNames.end,
|
value: fieldNames.end,
|
||||||
options: getCollectionFieldsOptions(name, ['date', 'datetime', 'dateOnly', 'datetimeNoTz'], {
|
options: getCollectionFieldsOptions(name, ['date', 'datetime', 'dateOnly', 'datetimeNoTz', 'unixTimestamp'], {
|
||||||
association: ['o2o', 'obo', 'oho', 'm2o'],
|
association: ['o2o', 'obo', 'oho', 'm2o'],
|
||||||
}),
|
}),
|
||||||
onChange: (end) => {
|
onChange: (end) => {
|
||||||
|
@ -70,10 +70,14 @@ export const useCreateCalendarBlock = () => {
|
|||||||
|
|
||||||
const createCalendarBlock = async ({ item }) => {
|
const createCalendarBlock = async ({ item }) => {
|
||||||
const stringFieldsOptions = getCollectionFieldsOptions(item.name, 'string', { dataSource: item.dataSource });
|
const stringFieldsOptions = getCollectionFieldsOptions(item.name, 'string', { dataSource: item.dataSource });
|
||||||
const dateFieldsOptions = getCollectionFieldsOptions(item.name, ['date', 'datetime', 'dateOnly', 'datetimeNoTz'], {
|
const dateFieldsOptions = getCollectionFieldsOptions(
|
||||||
association: ['o2o', 'obo', 'oho', 'm2o'],
|
item.name,
|
||||||
dataSource: item.dataSource,
|
['date', 'datetime', 'dateOnly', 'datetimeNoTz', 'unixTimestamp'],
|
||||||
});
|
{
|
||||||
|
association: ['o2o', 'obo', 'oho', 'm2o'],
|
||||||
|
dataSource: item.dataSource,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
const values = await FormDialog(
|
const values = await FormDialog(
|
||||||
t('Create calendar block'),
|
t('Create calendar block'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user