Filter a mask field

I’m using the DateTimeI18NBehavior with jQuery Masked Input.

The extension work. I see in the form my date (d/m/Y) and when i submit, the records are send in english mySql format (Y-m-d)

In my CGridView, i have a filter. A DropDownList save all dates of table and the user need to choose a date to filter.

I managed the configuration and now the CGridView show the dates, but when i select a date, he look for the date d/m/Y format.

Someone?

[ESPAÑOL]

Estoy utilizando la extensión DateTimeI18NBehavior, que junto al plugin para jQuery Masket Inputt, cuidan muy bien de la formatación de fechas. La extensión formata la fecha cuando viene de la base de datos para la ‘view’ y cuando va hacia la base de datos desde el form.

En mi CGridView, hice un filtro, donde un dropdown se abre y me muestra correctamente la fecha formatada, en la cual puedo hacer búsquedas, etc…

El próblema es que cuando procedo la búsqueda, el sistema está buscando por la fecha formatada en la base de datos. No por la fecha almacenada en la misma.

Creo que hay otra manera de hacerlo…

Alguien puede?

Better to post in the spanish form, or to ask in english.

thank’s

i edited.

Please! Someone!

This is solved!

¡He resuelto el problema!

Problema resolvido!

I using the i18N DateTime Behavior

I changed the search() method

                 if($this->data <> ''):


                    $data = date('Y-m-d', CDateTimeParser::parse($this->data, 


                                  Yii::app()->locale->dateFormat));


                    $criteria->compare('data', $data ,false, '=');


                   


                 else:


                    $data = null;


                 endif;