Wordpress 用于日期输入的电子商务签出字段
我以前使用插件创建过一些自定义签出字段,它们的标记与此类似:Wordpress 用于日期输入的电子商务签出字段,wordpress,woocommerce,Wordpress,Woocommerce,我以前使用插件创建过一些自定义签出字段,它们的标记与此类似: <label for="billing_wcj_checkout_field_1" class="">Date</label><input type="text" class="input-text " name="billing_wcj_checkout_field_1" id="billing_wcj_checkout_field_1" placeholder="" v
<label for="billing_wcj_checkout_field_1"
class="">Date</label><input type="text" class="input-text "
name="billing_wcj_checkout_field_1" id="billing_wcj_checkout_field_1"
placeholder="" value="" display="date" />
我无法设置显示类型和输入类“hasDatepicker”
非常感谢您提供的任何帮助或指导。您可以通过将以下行添加到数组中来为输入添加类:“input\u class”=>array('hasDatepicker'))
woocommerce_form_field(
'date', array(
'type' => 'text',
'class' =>array('form-row-first'),
'label' => __('Date'),
'required' => false
), $checkout->get_value( 'date' ));
woocommerce_form_field(
'date', array(
'type' => 'text',
'class' =>array('form-row-first'),
'label' => __('Date'),
'required' => false,
'input_class' => array('hasDatepicker')
), $checkout->get_value( 'date' ));