mirror of
https://gitee.com/nocobase/nocobase.git
synced 2024-12-02 12:18:15 +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 {
|
||||
title: t('Start date field'),
|
||||
value: fieldNames.start,
|
||||
options: getCollectionFieldsOptions(name, 'date', {
|
||||
options: getCollectionFieldsOptions(name, ['date', 'datetime', 'dateOnly', 'datetimeNoTz', 'unixTimestamp'], {
|
||||
association: ['o2o', 'obo', 'oho', 'm2o'],
|
||||
}),
|
||||
onChange: (start) => {
|
||||
@ -221,7 +221,7 @@ export const calendarBlockSettings = new SchemaSettings({
|
||||
return {
|
||||
title: t('End date field'),
|
||||
value: fieldNames.end,
|
||||
options: getCollectionFieldsOptions(name, ['date', 'datetime', 'dateOnly', 'datetimeNoTz'], {
|
||||
options: getCollectionFieldsOptions(name, ['date', 'datetime', 'dateOnly', 'datetimeNoTz', 'unixTimestamp'], {
|
||||
association: ['o2o', 'obo', 'oho', 'm2o'],
|
||||
}),
|
||||
onChange: (end) => {
|
||||
|
@ -70,10 +70,14 @@ export const useCreateCalendarBlock = () => {
|
||||
|
||||
const createCalendarBlock = async ({ item }) => {
|
||||
const stringFieldsOptions = getCollectionFieldsOptions(item.name, 'string', { dataSource: item.dataSource });
|
||||
const dateFieldsOptions = getCollectionFieldsOptions(item.name, ['date', 'datetime', 'dateOnly', 'datetimeNoTz'], {
|
||||
association: ['o2o', 'obo', 'oho', 'm2o'],
|
||||
dataSource: item.dataSource,
|
||||
});
|
||||
const dateFieldsOptions = getCollectionFieldsOptions(
|
||||
item.name,
|
||||
['date', 'datetime', 'dateOnly', 'datetimeNoTz', 'unixTimestamp'],
|
||||
{
|
||||
association: ['o2o', 'obo', 'oho', 'm2o'],
|
||||
dataSource: item.dataSource,
|
||||
},
|
||||
);
|
||||
|
||||
const values = await FormDialog(
|
||||
t('Create calendar block'),
|
||||
|
Loading…
Reference in New Issue
Block a user