Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to force the user to use the date picker instead of insert the text ?

By
Anabela Damas
on 7/6/15, 5:16 AM 574 views

Hi, 

Do you know if it's possible to have this beavior in odoo :

<input class="oe_datepicker_master" type="text" name="date_start" readonly="">

This html forces the user to use date picker and the user can't insert text. 

If I do readonly=True in odoo the user can't write the date or even choose the date from the date picker.

Do you know how to do this in odoo?

Thanks


0
David Bertha
On 7/6/15, 5:41 AM

You will always have a extreme case where the user's browser doesn't load the javascripts.

If you want constraints on what can be encoded in that field, you should check the submitted form with the same rules used by the date picker.

Maybe you can define a javascript that will remove the readonly property of the field only when date picker have the focus.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 7/6/15, 5:16 AM
Seen: 574 times
Last updated: 7/6/15, 5:41 AM