From 78582ab91cbd2d077de75df555029ead60b36844 Mon Sep 17 00:00:00 2001 From: Sanae Date: Wed, 26 Jun 2024 21:25:22 +0000 Subject: [PATCH] time field --- ui/fields/date.js | 3 +-- ui/fields/time.js | 8 ++++++++ 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 ui/fields/time.js diff --git a/ui/fields/date.js b/ui/fields/date.js index 010f8797..856ff706 100644 --- a/ui/fields/date.js +++ b/ui/fields/date.js @@ -1,4 +1,3 @@ -import { html, render } from '../vendor.js' import OBFieldDatetime from './datetime.js'; class OBFieldDate extends OBFieldDatetime { @@ -6,4 +5,4 @@ class OBFieldDate extends OBFieldDatetime { valueStringFormat = "MMM D, YYYY"; } -customElements.define('ob-field-date', OBFieldDate); \ No newline at end of file +customElements.define('ob-field-date', OBFieldDate); diff --git a/ui/fields/time.js b/ui/fields/time.js new file mode 100644 index 00000000..667e0785 --- /dev/null +++ b/ui/fields/time.js @@ -0,0 +1,8 @@ +import OBFieldDatetime from './datetime.js'; + +class OBFieldTime extends OBFieldDatetime { + valueFormat = "HH:mm:ss"; + valueStringFormat = "h:mm A"; +} + +customElements.define('ob-field-time', OBFieldTime);