Magento 产品自定义选项中的日期选择器仅提供日期。需要日期和时间

Date picker in Magento product custom option gives only date. Need date and time

我为我的产品添加了 custom optionInput type 对于 custom option 日期和时间。

为了避免在产品页面中出现下拉菜单和显示日期选择器,我更改了:

Use JavaScript Calendar to "yes"System > Configuration > Catalog > Catalog > Date&Time Custom Options >

但是datepicker gives date only没时间。 I need date and time. select 时间的下拉框仍然显示。我想避免这个下拉菜单。

有什么方法可以给日期选择器同时提供日期和时间。

Magento 版本 1.9.0.1

custom optioninput type 设置为 Date。 并在 app/code/core/Mage/Core/Block/Html/Date.php 文件中更改代码如下

var calendarSetupObject = {
                inputField  : "' . $this->getId() . '",
                ifFormat: "%Y-%m-%e %H:%M:%S", //changed line
                showsTime: true,               //changed line
                button      : "' . $this->getId() . '_trig",
                align       : "Bl",
                singleClick : true,

现在我们可以 select 日期选择器中的日期和时间,并且可以避免下拉时间。