index.ts 700 B

1234567891011121314151617181920212223
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import { dateFieldProps } from '#shared/components/Form/fields/FieldDate/types.ts'
  3. import createInput from '#shared/form/core/createInput.ts'
  4. import addLink from '#shared/form/features/addLink.ts'
  5. import formUpdaterTrigger from '#shared/form/features/formUpdaterTrigger.ts'
  6. import FieldDateTimeInput from './FieldDateTimeInput.vue'
  7. const dateFieldDefinition = createInput(FieldDateTimeInput, dateFieldProps, {
  8. features: [addLink, formUpdaterTrigger()],
  9. })
  10. export default [
  11. {
  12. fieldType: 'date',
  13. definition: dateFieldDefinition,
  14. },
  15. {
  16. fieldType: 'datetime',
  17. definition: dateFieldDefinition,
  18. },
  19. ]