if you need a cutsom widget with a custom format, and you already rewrote
the widget, why don't you rewrite also the validator ?!
On Wednesday, June 24, 2015 at 10:00:46 AM UTC+2, Annet wrote:
I wrote a widget to format time:
def timeplain(field, value):
if value == None:
value
Hi Villas,
Thanks for your reply.
IS_TIME() does not format but understands the following formats
I thought maybe in line with IS_DATE(format='') and IS_DATETIME(format='')
IS_TIME would have a format property as well.
Otherwise I think you'll have to make your own validator which I don't
Hi Annet,
Yes, take a look at the code in gluon/validators.py
Best Regards, D
On Wednesday, 18 April 2012 07:04:46 UTC+1, Annet wrote:
Hi Villas,
Thanks for your reply.
IS_TIME() does not format but understands the following formats
I thought maybe in line with IS_DATE(format='')
IS_TIME() does not format but understands the following formats
hh:mm:ss [am/pm]
hh:mm [am/pm]
hh [am/pm]
Otherwise I think you'll have to make your own validator which I don't
think would be too difficult.
4 matches
Mail list logo