无法为Zend Framework 2日期表单元素设置日期格式?

I'm just trying to make a Date element in a Form, but the date format is always "mm/dd/yyyy" no matter how I try to change it. I tried setting it up like this:

    $this->add(array(
        'name' => 'ct-start_date',
        'options' => array(
                    'label' => 'Start Date',
                    'format'=>'Y-m-d'
                    ),
        'attributes' => array(
            'class' => 'ct-date',
        ),
        'type'  => 'Zend\Form\Element\Date',
    ));

And displaying like this:

    echo $this->formRow($form->get('ct-start_date'));

But it still comes out as "mm/dd/yyyy" even though when I do:

    print_r($form->get('ct-start_date')->getFormat());

that comes out as "Y-m-d"! So I added this:

    $this->get('ct-start_date')->setOptions(array('format'=>'Y-m-d'));

No change. Then I tried this:

    $date = new Element\Date('ct-start_date');
    $date
        ->setLabel('Start Date')
        ->setAttributes(array(
            'class' => 'ct-date',
        ))
        ->setOptions(array(
            'format' => 'Y-m-d'
        ));
    $this->add($date);

Same thing! That's in Chrome. In Firefox it's just an empty text input. Maybe I should just fall back on jQuery.

The format option in the Date element doesn't affect the input or output format of dates within the element.

It is used by the element's getInputSpecification() method to determine the date format to be used with the validator.

Example:

$this->add(array(
    'name' => 'ct-start_date',
    'options' => array(
                'label' => 'Start Date',
                'format'=>'Y-m-d'
                ),
    'attributes' => array(
        'class' => 'ct-date',
    ),
    'type'  => 'Zend\Form\Element\Date',
));

//...

public function getInputFilter()
{
    $filter = new InputFilter()

    // add default filters and validators for the date element
    // the date validator will automatically be set up to accept dates
    // formatted according to your elemen's "format" option
    $filter->add($this->get('ct-start-date')->getInputSpecification());

    ../
    return $filter;
}

If you are going to populate the form element with a date value from the server side, it needs to be in the appropriate format (e.g. $element->setValue(date('Y-m-d', $date));)

On the client side, they will either need to type it in the appropriate format or the validator will return an error, or make sure whatever client side date input you are using puts it in the Y-m-d format.