Re: [web2py] Re: Date format and date picker

2014-03-05 Thread Gael Princivalle
Sorry for that. My language Chrome setting was with "English" as first. Now with Italian that's ok. 2014-03-05 12:08 GMT+01:00 mcamel : > Very strange. This works for me at Chromium Version 32.0.1700.107 Ubuntu > 12.04: > > def test_date(): > T.force('it') > > db = DAL('sqlite:memory:')

[web2py] Re: Date format and date picker

2014-03-05 Thread mcamel
Very strange. This works for me at Chromium Version 32.0.1700.107 Ubuntu 12.04: def test_date(): T.force('it') db = DAL('sqlite:memory:') db.define_table('test', Field('d', 'date')) form = SQLFORM(db.test) form.validate() return dict(form=form) At it.py (you can also t

[web2py] Re: Date format and date picker

2014-03-04 Thread Gael Princivalle
Ok so like that: Field('concert_date', type='date', requires = IS_DATE(format='%Y-%m-%d')) And on Chrome problem still the same. I think the problem is more global about language detection with Chrome. If I use web2py on Firefox I've got no problems. On Chrome it's a disaster. For example when I

[web2py] Re: Date format and date picker

2014-03-04 Thread Anthony
> > Here is my field in db.py: > Field('concert_date', type='date', requires = IS_DATE(format=T('%Y-%m-%d' > ))) > Do not wrap the "format" argument to IS_DATE() in T() -- it will be translated automatically. Also, if desired, note that you can alter the date format for the Javascript widget u

[web2py] Re: Date format and date picker

2014-03-04 Thread Gael Princivalle
Yes I have it in my it.py language file. But when I choose in the datepicker a date in my Italian page, date picker give me the date in '%d/%m/%Y', but the field validation still in US format: enter date as 1963-08-28 Here is my field in db.py: Field('concert_date', type='date', requires = IS_DA

[web2py] Re: Date format and date picker

2014-03-03 Thread mcamel
I'm not sure to understand your problem, but just in case it helps: have you tried to use this in your language file: '%Y-%m-%d': '%d/%m/%Y', Default date validator will do inner convertions between both formats, so you'll have no problems with DAL and database backend. Regards. El sábado, 1

[web2py] Re: Date format and date picker

2014-03-01 Thread Tim Richardson
I try to consider that a field defined as Date is a Date in the python sense, not a string representation. In some backends it may be a stored as a string, but I consider that the private business of the database. The DAL gives back a Date. (If it was stored as a string I would hope that it was