date.ts 599 B

1234567891011121314151617181920212223
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import type { FieldResolverModule } from '#shared/entities/object-attributes/types/resolver.ts'
  3. import FieldResolver from '../FieldResolver.ts'
  4. export class FieldResolverDate extends FieldResolver {
  5. fieldType = 'date'
  6. // TODO: there are also :diff, :future and :past attributes, what about them?
  7. public fieldTypeAttributes() {
  8. return {
  9. props: {
  10. clearable: !!this.attributeConfig.null,
  11. },
  12. }
  13. }
  14. }
  15. export default <FieldResolverModule>{
  16. type: 'date',
  17. resolver: FieldResolverDate,
  18. }