datetime.ts 615 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 FieldResolverDateTime extends FieldResolver {
  5. fieldType = 'datetime'
  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: 'datetime',
  17. resolver: FieldResolverDateTime,
  18. }