欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

drupal7 d7 field date 15 minutes 字段为什么增长一次总是15分钟 我自己亲自做的 AG chatgpt 有大用 有大大用

下面是自己亲自做的,

到内容类型的字段编辑页面

/admin/structure/types/manage/cs-computers-format/fields/field_cs_computer_time

下面 把 时间的步进增长量由 15 分钟改成了 1 分钟,,

14.png


In Drupal 7, you can create a date field with 15-minute increments by using the "Date" module and configuring the field settings.

  1. First, make sure the "Date" module is installed and enabled in your Drupal 7 site.

  2. Go to the "Content types" section in the Drupal admin menu and click on the content type for which you want to add the date field.

  3. Click on the "Manage fields" tab for the content type and then click on the "Add field" button.

  4. Choose "Date" as the field type and give the field a label and machine name.

  5. In the "Date" field settings, choose "Date and time" as the input method.

  6. Under the "Date selection" section, choose "Pop-up" as the date picker and check the "Enable time entry" option.

  7. In the "Time entry options" section, choose "15 minutes" as the time increment.

  8. Save the field settings and then save the changes to the content type.

Now, when you create or edit content of that content type, you will see the date field with a date and time picker that allows you to select the date and time in 15-minute increments.


在Drupal7中,您可以使用“日期”模块并配置字段设置,创建一个以15分钟为增量的日期字段。

首先,确保在Drupal7站点中安装并启用了“Date”模块。

转到Drupal管理菜单中的“内容类型”部分,然后单击要添加日期字段的内容类型。

单击内容类型的“管理字段”选项卡,然后单击“添加字段”按钮。

选择“日期”作为字段类型,并为字段提供标签和机器名称。

在“日期”字段设置中,选择“日期和时间”作为输入法。

在“日期选择”部分,选择“弹出”作为日期选择器,并选中“启用时间输入”选项。

在“时间输入选项”部分,选择“15分钟”作为时间增量。

保存字段设置,然后保存对内容类型的更改。

现在,当您创建或编辑该内容类型的内容时,您将看到带有日期和时间选择器的日期字段,该选择器允许您以15分钟为增量选择日期和时间。






普通分类: