Skip to Content
Odoo मेन्यू
  • Sign in
  • मुफ़्त में आज़माएं
  • ऐप्लिकेशन
    फ़ाइनेंस
    • अकाउंटिंग
    • इनवॉइसिंग
    • एक्सपेंस
    • स्प्रेडशीट (बीआई)
    • डॉक्यूमेंट्स
    • साइन
    सेल्स
    • सीआरएम
    • सेल्स
    • पीओएस शॉप
    • पीओएस रेस्टोरेंट
    • सब्सक्रिप्शन
    • रेंटल
    वेबसाइट
    • वेबसाइट बिल्डर
    • ई-कॉमर्स
    • ब्लॉग
    • फ़ोरम
    • लाइव चैट
    • ई-लर्निंग
    सप्लाई चेन
    • इन्वेंट्री
    • मैन्युफ़ैक्चरिंग
    • पीएलएम
    • परचेज़
    • मेंटेनेंस
    • क्वालिटी
    मानव संसाधन
    • कर्मचारी
    • रिक्रूटमेंट
    • टाइम ऑफ़
    • अप्रेज़ल
    • रेफ़रल
    • फ़्लीट
    मार्केटिंग
    • सोशल मार्केटिंग
    • ईमेल मार्केटिंग
    • एसएमएस मार्केटिंग
    • इवेंट
    • मार्केटिंग ऑटोमेशन
    • सर्वे
    सेवाएं
    • प्रोजेक्ट
    • टाइमशीट
    • फ़ील्ड सर्विस
    • हेल्पडेस्क
    • प्लानिंग
    • अपॉइंटमेंट
    प्रॉडक्टिविटी
    • डिस्कस
    • अप्रूवल
    • आईओटी
    • वीओआईपी
    • नॉलेज
    • WhatsApp
    तीसरे पक्ष के ऐप्लिकेशन Odoo स्टूडियो Odoo क्लाउड प्लेटफ़ॉर्म
  • इंडस्ट्री
    रीटेल
    • बुक स्टोर
    • क्लोदिंग स्टोर
    • फ़र्नीचर स्टोर
    • ग्रॉसरी स्टोर
    • हार्डवेयर स्टोर
    • टॉय स्टोर
    Food & Hospitality
    • बार और पब
    • रेस्टोरेंट
    • फ़ास्ट फ़ूड
    • Guest House
    • बेवरिज डिस्ट्रीब्यूटर
    • होटल
    रियल एस्टेट
    • Real Estate Agency
    • आर्किटेक्चर फ़र्म
    • कंसट्रक्शन
    • एस्टेट मैनेजमेंट
    • गार्ड्निंग
    • प्रॉपर्टी ओनर असोसिएशन
    कंसल्टिंग
    • अकाउंटिंग फ़र्म
    • Odoo पार्टनर
    • मार्केटिंग एजेंसी
    • लॉ फ़र्म
    • टैलेंट ऐक्विज़िशन
    • ऑडिट & सर्टिफ़िकेशन
    मैन्युफ़ैक्चरिंग
    • टेक्सटाइल
    • Metal
    • फ़र्नीचर
    • फ़ूड
    • Brewery
    • कॉर्पोरेट गिफ़्ट
    हेल्थ & फिटनेस
    • स्पोर्ट्स क्लब
    • आईवियर स्टोर
    • फिटनेस सेंटर
    • वेलनेस प्रैक्टिशनर
    • फॉर्मेसी
    • हेयर सैलून
    Trades
    • Handyman
    • आईटी हॉर्डवेयर और सपोर्ट
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    अन्य
    • Nonprofit Organization
    • एन्वायरमेंटल एजेंसी
    • बिलबोर्ड रेंटल
    • फ़ोटोग्राफी
    • बाइक लीजिंग
    • सॉफ़्टवेयर रीसेलर
    Browse all Industries
  • कम्यूनिटी
    सीखें
    • ट्यूटोरियल्स
    • दस्तावेज़
    • सर्टिफ़िकेशन
    • ट्रेनिंग
    • ब्लॉग
    • पॉडकास्ट
    शिक्षा को बढ़ावा दें
    • एजुकेशन प्रोग्राम
    • स्केल अप! बिजनेस गेम
    • Odoo के ऑफ़िस में आएं
    सॉफ़्टवेयर पाएं
    • डाउनलोड
    • वर्शन की तुलना करें
    • रिलीज़
    साथ मिलकर काम करें
    • Github
    • फ़ोरम
    • इवेंट
    • अनुवाद
    • पार्टनर बनें
    • Services for Partners
    • अपना अकाउंटिंग फ़र्म रजिस्टर करें
    सेवाएं पाएं
    • पार्टनर ढूंढें
    • अकाउंटेंट खोजें
    • सलाहकार की मदद लें
    • इम्प्लिमेंटेशन सेवाएं
    • कस्टमर रेफ़रेंस
    • सहायता
    • अपग्रेड
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    डेमो देखें
  • कीमत
  • सहायता

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • सीआरएम
  • e-Commerce
  • लेखांकन
  • इन्वेंटरी
  • PoS
  • प्रोजेक्ट
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
टैग (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
टैग (View all)
odoo accounting v14 pos v15
About this forum
Help

Datetime picker in website Odoo 12

Subscribe

Get notified when there's activity on this post

This question has been flagged
datetimeodooV12
1 Reply
9623 Views
Avatar
David Kovač

I am trying to create a datetime picker in a form using o_website_form_datetime, but the problem is that, the input field doesn't show the popup to enter the date and time.

 This is the code for my input:

<input id="date_time_funeral" type="text" name="date_time_funeral" class="form-control o_website_form_datetime" t-att-value="date_time_funeral" data-date-format="DD.MM.YYYY HH:MM" style="text-align: center;" autocomplete="off" required="true"/>


I took the code from an odoo 10 project, and there it works with no problem.

I am avoiding to use type="datetime-local", since it is not supported by all browsers.

1
Avatar
Discard
Avatar
David Kovač
Author Best Answer

I've found out, there is a js and css file for the datetime picker both with the name tempusdominus, and i made some reasearch about it on the web, and i did a test.html file, in witch everything works fine, but in my odoo project it does not show the popup for the datetime picker. When the field is focus, it only inserts the current date and time without the popup, but if i manuly add jquery, bootrap and font-awsome it shows the popup and everything, but i get lots of errors in the console.


Here is what i add with xpath:

    <template inherit_id="website.assets_frontend" name="Website Form Assets Frontend" id="assets_frontend">
<xpath position="inside" expr=".">


            <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" />
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"/>


<script type="text/javascript" src="/test_datetime/static/src/tempusdominus/moment-with-locales.min.js"/>
<script type="text/javascript" src="/test_datetime/static/src/tempusdominus/tempusdominus.js"/>
<link type="text/css" href="/test_datetime/static/src/tempusdominus/tempusdominus.css" rel="stylesheet"/>
</xpath>
</template>

this is now my input field:

<input id="date_time_funeral" type="text" name="date_time_funeral" class="form-control datetimepicker-input" data-toggle="datetimepicker" data-target="#date_time_funeral" style="text-align: center;" autocomplete="off"/>

<script type="text/javascript">
$(function () {
$('#date_time_funeral').datetimepicker();
});
</script>

here are the console errors:

Uncaught TypeError: Cannot read property '_options' of undefined

    at HTMLInputElement.<anonymous> (web.assets_common.js:3107)

    at HTMLDocument.dispatch (web.assets_common.js:892)

    at HTMLDocument.elemData.handle (web.assets_common.js:865)

    at Object.trigger (web.assets_common.js:886)

    at Object.simulate (web.assets_common.js:907)

    at HTMLDocument.handler (web.assets_common.js:924)

(anonymous) @ web.assets_common.js:3107

dispatch @ web.assets_common.js:892

elemData.handle @ web.assets_common.js:865

trigger @ web.assets_common.js:886

simulate @ web.assets_common.js:907

handler @ web.assets_common.js:924

web.assets_common.js:3456 error: Some modules could not be started

log @ web.assets_common.js:3456

(anonymous) @ web.assets_common.js:3469

e @ jquery.min.js:2

t @ jquery.min.js:2

setTimeout (async)

(anonymous) @ jquery.min.js:2

c @ jquery.min.js:2

add @ jquery.min.js:2

(anonymous) @ jquery.min.js:2

Deferred @ jquery.min.js:2

then @ jquery.min.js:2

(anonymous) @ web.assets_common.js:3469

(anonymous) @ web.assets_common.js:44

setTimeout (async)

_.delay @ web.assets_common.js:44

log_when_loaded @ web.assets_common.js:3469

fire @ web.assets_common.js:796

fireWith @ web.assets_common.js:801

ready @ web.assets_common.js:809

completed @ web.assets_common.js:810

web.assets_common.js:3457 Failed modules:           (3) ["payment.processing", "website.content.compatibility", "web_editor.widget"]

log @ web.assets_common.js:3457

(anonymous) @ web.assets_common.js:3469

e @ jquery.min.js:2

t @ jquery.min.js:2

setTimeout (async)

(anonymous) @ jquery.min.js:2

c @ jquery.min.js:2

add @ jquery.min.js:2

(anonymous) @ jquery.min.js:2

Deferred @ jquery.min.js:2

then @ jquery.min.js:2

(anonymous) @ web.assets_common.js:3469

(anonymous) @ web.assets_common.js:44

setTimeout (async)

_.delay @ web.assets_common.js:44

log_when_loaded @ web.assets_common.js:3469

fire @ web.assets_common.js:796

fireWith @ web.assets_common.js:801

ready @ web.assets_common.js:809

completed @ web.assets_common.js:810

web.assets_common.js:3458 Rejected modules:         (6) ["portal.portal", "sale_management.sale_management", "website_rating_project.rating", "account.AccountPortalSidebar.instance", "sale.SalePortalSidebar.instance", "root.widget"]

log @ web.assets_common.js:3458

(anonymous) @ web.assets_common.js:3469

e @ jquery.min.js:2

t @ jquery.min.js:2

setTimeout (async)

(anonymous) @ jquery.min.js:2

c @ jquery.min.js:2

add @ jquery.min.js:2

(anonymous) @ jquery.min.js:2

Deferred @ jquery.min.js:2

then @ jquery.min.js:2

(anonymous) @ web.assets_common.js:3469

(anonymous) @ web.assets_common.js:44

setTimeout (async)

_.delay @ web.assets_common.js:44

log_when_loaded @ web.assets_common.js:3469

fire @ web.assets_common.js:796

fireWith @ web.assets_common.js:801

ready @ web.assets_common.js:809

completed @ web.assets_common.js:810

web.assets_common.js:3459 Rejected linked modules:  (24) ["web_tour.tour", "website.tour_reset_password", "website_sale.tour_shop", "website_sale.tour_shop_cart_recovery", "website_sale.tour_shop_mail", "website_crm.tour", "portal.tour", "website.test.html_editor", "website_sale.tour", "website_sale.tour_shop_customize", "website_sale.tour_shop_custom_attribute_value", "website_sale.tour_shop_zoom", "website_sale.tour_shop_dynamic_variants", "website_sale.tour_shop_deleted_archived_variants", "website_sale.tour_shop_list_view_b2c", "website_sale.tour_shop_no_variant_attribute", "website_sale_comparison.tour_comparison", "website_sale_wishlist.tour", "web_editor.tour", "website.tour.banner", "website.tour.contact", "website.tour.customize", "website.tour.rte", "website_blog.tour"]

log @ web.assets_common.js:3459

(anonymous) @ web.assets_common.js:3469

e @ jquery.min.js:2

t @ jquery.min.js:2

setTimeout (async)

(anonymous) @ jquery.min.js:2

c @ jquery.min.js:2

add @ jquery.min.js:2

(anonymous) @ jquery.min.js:2

Deferred @ jquery.min.js:2

then @ jquery.min.js:2

(anonymous) @ web.assets_common.js:3469

(anonymous) @ web.assets_common.js:44

setTimeout (async)

_.delay @ web.assets_common.js:44

log_when_loaded @ web.assets_common.js:3469

fire @ web.assets_common.js:796

fireWith @ web.assets_common.js:801

ready @ web.assets_common.js:809

completed @ web.assets_common.js:810

web.assets_common.js:3460 Non loaded modules:       (18) ["web_editor.editor", "web_editor.rte.summernote", "web_editor.snippet.editor", "web_editor.snippets.options", "web_editor.translate", "web_unsplash.image_widgets", "point_of_sale.editor", "website.editor", "website.rte.summernote", "website.snippets.options", "website.contentMenu", "website.editMenu", "website.seo", "website.translateMenu", "website.theme", "website_sale.editor", "website_blog.editor", "website_blog.s_latest_posts_editor"]0: "web_editor.editor"1: "web_editor.rte.summernote"2: "web_editor.snippet.editor"3: "web_editor.snippets.options"4: "web_editor.translate"5: "web_unsplash.image_widgets"6: "point_of_sale.editor"7: "website.editor"8: "website.rte.summernote"9: "website.snippets.options"10: "website.contentMenu"11: "website.editMenu"12: "website.seo"13: "website.translateMenu"14: "website.theme"15: "website_sale.editor"16: "website_blog.editor"17: "website_blog.s_latest_posts_editor"length: 18__proto__: Array(0)

log @ web.assets_common.js:3460

(anonymous) @ web.assets_common.js:3469

e @ jquery.min.js:2

t @ jquery.min.js:2

setTimeout (async)

(anonymous) @ jquery.min.js:2

c @ jquery.min.js:2

add @ jquery.min.js:2

(anonymous) @ jquery.min.js:2

Deferred @ jquery.min.js:2

then @ jquery.min.js:2

(anonymous) @ web.assets_common.js:3469

(anonymous) @ web.assets_common.js:44

setTimeout (async)

_.delay @ web.assets_common.js:44

log_when_loaded @ web.assets_common.js:3469

fire @ web.assets_common.js:796

fireWith @ web.assets_common.js:801

ready @ web.assets_common.js:809

completed @ web.assets_common.js:810

1
Avatar
Discard
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
Difference Between Two Dates (result not showing up when diff = 0 Day)
datetime
Avatar
Avatar
Avatar
3
जून 25
1961
Data Exceeded error while importing data in Odoo v12 Solved
odooV12
Avatar
Avatar
Avatar
Avatar
Avatar
4
मई 24
8284
date time DB
datetime
Avatar
Avatar
1
जुल॰ 23
4760
Project and Timesheets
odooV12
Avatar
Avatar
1
जुल॰ 23
2903
Accepting Bancontact payments through Paypal
odooV12
Avatar
Avatar
Avatar
3
जून 23
4000
कम्यूनिटी
  • ट्यूटोरियल्स
  • दस्तावेज़
  • फ़ोरम
ओपन सोर्स
  • डाउनलोड
  • Github
  • रनबॉट
  • अनुवाद
सेवाएं
  • Odoo.sh Hosting
  • सहायता
  • अपग्रेड
  • कस्टम डेवलपमेंट्स
  • शिक्षा
  • अकाउंटेंट खोजें
  • पार्टनर ढूंढें
  • पार्टनर बनें
हमारे बारे में
  • हमारी कंपनी
  • ब्रांड ऐसेट
  • संपर्क करें
  • नौकरियां
  • इवेंट
  • पॉडकास्ट
  • ब्लॉग
  • ग्राहक
  • लीगल • गोपनीयता
  • सुरक्षा
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo, बिज़नेस से जुड़े ऐप्लिकेशन का एक कलेक्शन है जो ओपन सोर्स पर आधारित है. इसमें आपकी कंपनी की हर ज़रूरत के लिए ऐप्लिकेशन हैं. जैसे, सीआरएम, ई-कॉमर्स, अकाउंटिंग, इन्वेंट्री, पॉइंट ऑफ़ सेल, प्रोजेक्ट मैनेजमेंट वगैरह.

Odoo की सबसे बड़ी खासियत है कि यह इस्तेमाल करने में बहुत आसान है और यह पूरी तरह से इंटिग्रेट किया हुआ है.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now