【问题标题】:Cakephp customizing the output of date input form helpersCakephp 自定义日期输入表单助手的输出
【发布时间】:2011-05-28 14:49:02
【问题描述】:

我明白了

echo $this->Form->input('birthdate', array( 'label' => __('Geburtsdatum', true)
                        , 'dateFormat' => 'DMY'
                        , 'minYear' => date('Y') - 70
                        , 'maxYear' => date('Y') - 10 ));

在模型中,我将生日设置为日期。现在 Cakephp 吐出三个选择框,我非常喜欢。但它也会在两者之间吐出两个难看的破折号/连字符,我想去掉它们。

选择框-选择框-选择框

有什么建议吗?

【问题讨论】:

    标签: cakephp date input html-helper


    【解决方案1】:

    您可以指定separator 选项:

    'separator' => 'YOUR_SEPARATOR'
    

    【讨论】:

    • 甚至比我所希望的还要多。非常感谢!
    • 我可以发誓这是拼写“分隔符”。多哈。这就是为什么它对我不起作用!让我想起了我的第一次 html 体验,以及“颜色”css 不起作用......
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多