check the source of your page (or print somewhere in it {{=T('%Y-%m-%d')}}).
'%Y-%m-%d' is just a *placeholder *for the T operator: that T() translates 
whatever value it's assigned to the key '%Y-%m-%d' ..... that little line 
in web2py_ajax.html "passes" the *translated *value to the javascript 
variable w2p_ajax_date_format i.e. 

for it users web2py_ajax.html should render var w2p_ajax_date_format = 
'%d/%m/%Y'

https://github.com/web2py/web2py/blob/master/applications/welcome/languages/it.py#L12

while for cs users should render w2p_ajax_date_format = '%d.%m.%Y'

https://github.com/web2py/web2py/blob/master/applications/welcome/languages/cs.py#L9

etc etc etc

tl;dr usually you don't change the format acting on web2py_ajax.html, you 
edit the language file corresponding to your locale settings.

On Wednesday, January 23, 2013 12:20:05 PM UTC+1, Ramos wrote:
>
> Hello i my web2py_ajax.html i see
>
>  var w2p_ajax_date_format = "{{=T('%Y-%m-%d')}}";
>
> But in a sqlform.factory generated form if i select a day in the widget it 
> pastes the date as 01-01-2013 ignoring the format
>
> however if i change the format to
>
>  var w2p_ajax_date_format = "{{=T('%Y*/*%m*/*%d')}}";
>
> it pastes the date as 2013/01/01
>
> Is this a bug?
>
> Thank you
>
> António
>

-- 



Reply via email to