This question has been flagged
2 Replies
5200 Views

Hi,

I want to put time picker for a field. I dont want to use field with float type and widget=float_time. There is no validations at all. I want to pick timings in 12 hr format with PM and AM. Is it possible to do ?

Avatar
Discard
Best Answer

Hello,

May be this will helpful to you.

Take one char field in xml and give id to field.

Now add below js library in your module for time picker.

  http://amsul.ca/pickadate.js/

And give path in web extend from xml.(picker.time.js path)

and give this in your js file

$('#id given in xml').pickatime()

 This is not full code you have to little work on it.

Thanks.

Shamji


 

Avatar
Discard
Best Answer

Hi, 

Refer the app 
https://apps.odoo.com/apps/modules/16.0/field_timepicker/
The module allows the user to add time picker widget that can be used with character type fields in Odoo

Avatar
Discard