我如何在 angular 模式表单中使用时间选择器

How can i use timepicker in angular schema forms

我正在使用 angular 架构形式

https://github.com/Textalk/angular-schema-form/tree/master

日期选择器有一个插件

https://github.com/Textalk/angular-schema-form-datepicker

但不支持时间选择器

我如何在那里添加时间选择器或日期时间选择器

Date 可以正常工作

scope.schema = {
  "type": "object",
  "properties": {
    "birthDate": {
      "title": "Bday",
      "type": "string",
      "format": "date"
    }

} }

如果您愿意,可以扩展模式表单。他们提供了非常详细的 documentation 操作方法。

您可以尝试使用已经构建好的。 schema-form 保留了 3rd 方添加到 schema-form here.

的目录

This 日期时间选择器可用。

"type": "string" and "format": "datetimepicker"

选项: { "key": "publish_at", "options":{ "minDate":新日期(), "minuteStep": 15, "autoclose": 1 } },

我是 textalk 的开发人员之一,负责 Angular 模式表单。 datepicker addon 建立在 pickadate.js 之上。如您所知,Pickadate 支持时间选择器,但我们不需要它。

您的选择是要么修改日期选择器插件以也使用时间选择器,要么像上面提到的 tpie 和文档 is here.

创建一个新插件

至于如何使用插件?自述文件中通常有关于如何加载文件以及 schema/form 应该是什么样子来使用它的详细解释。不是所有的第三方都写,但我们都有详细的说明。