ShivaGuntuku
ShivaGuntuku

Reputation: 5475

How to show Datetime Field in odoo Front end Website

How to show Datetime Field in odoo Front end Website. i tried various ways but it not possible. <input type="datetime"/> it's not working in odoo website. need help.

Upvotes: 0

Views: 1730

Answers (1)

Hilar AK
Hilar AK

Reputation: 1675

Try

<input type="datetime-local"/>

<!DOCTYPE html>
<html>
<body>

<p>
Depending on browser support:<br>
A date picker can pop-up when you enter the input field.
</p>

<form action="/action_page.php">
  Birthday (date and time):
  <input type="datetime-local" name="bdaytime">
  <input type="submit" value="Send">
</form>

<p><strong>Note:</strong> type="datetime-local" is not supported in Firefox, or Internet Explorer 12 and earlier versions.</p>

</body>
</html>

I The input type datetime-local is not supported on all browsers. so in odoo better would be store the data in a text field. or you can use any custom libraries for datetime picker.

Upvotes: 1

Related Questions