Overslaan naar inhoud
Odoo Menu
  • Aanmelden
  • Probeer het gratis
  • Apps
    Financiën
    • Boekhouding
    • Facturatie
    • Onkosten
    • Spreadsheet (BI)
    • Documenten
    • Ondertekenen
    Verkoop
    • CRM
    • Verkoop
    • Kassasysteem winkel
    • Kassasysteem Restaurant
    • Abonnementen
    • Verhuur
    Websites
    • Websitebouwer
    • E-commerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Bevoorradingsketen
    • Voorraad
    • Productie
    • PLM
    • Inkoop
    • Onderhoud
    • Kwaliteit
    Personeelsbeheer
    • Werknemers
    • Werving & Selectie
    • Verlof
    • Evaluaties
    • Aanbevelingen
    • Wagenpark
    Marketing
    • Sociale media-marketing
    • E-mailmarketing
    • Sms-marketing
    • Evenementen
    • Marketingautomatisering
    • Enquêtes
    Diensten
    • Project
    • Urenstaten
    • Buitendienst
    • Helpdesk
    • Planning
    • Afspraken
    Productiviteit
    • Chat
    • Goedkeuringen
    • IoT
    • VoIP
    • Kennis
    • WhatsApp
    Apps van derden Odoo Studio Odoo Cloud Platform
  • Bedrijfstakken
    Detailhandel
    • Boekhandel
    • kledingwinkel
    • Meubelzaak
    • Supermarkt
    • Bouwmarkt
    • Speelgoedwinkel
    Food & Hospitality
    • Bar en Pub
    • Restaurant
    • Fastfood
    • Gastenverblijf
    • Drankenhandelaar
    • Hotel
    Vastgoed
    • Makelaarskantoor
    • Architectenbureau
    • Bouw
    • Vastgoedbeheer
    • Tuinieren
    • Vereniging van eigenaren
    Consulting
    • Accountantskantoor
    • Odoo Partner
    • Marketingbureau
    • Advocatenkantoor
    • Talentenwerving
    • Audit & Certificering
    Productie
    • Textiel
    • Metaal
    • Meubels
    • Eten
    • Brewery
    • Relatiegeschenken
    Gezondheid & Fitness
    • Sportclub
    • Opticien
    • Fitnesscentrum
    • Wellness-medewerkers
    • Apotheek
    • Kapper
    Trades
    • Klusjesman
    • IT-hardware & support
    • Zonne-energiesystemen
    • Schoenmaker
    • Schoonmaakdiensten
    • HVAC-diensten
    Andere
    • Non-profitorganisatie
    • Milieuagentschap
    • Verhuur van Billboards
    • Fotograaf
    • Fietsleasing
    • Softwareverkoper
    Browse all Industries
  • Community
    Leren
    • Tutorials
    • Documentatie
    • Certificeringen
    • Training
    • Blog
    • Podcast
    Versterk het onderwijs
    • Onderwijs- programma
    • Scale Up! Business Game
    • Bezoek Odoo
    Download de Software
    • Downloaden
    • Vergelijk edities
    • Releases
    Werk samen
    • Github
    • Forum
    • Evenementen
    • Vertalingen
    • Word een Partner
    • Services for Partners
    • Registreer je accountantskantoor
    Diensten
    • Vind een partner
    • Vind een boekhouder
    • Een adviseur ontmoeten
    • Implementatiediensten
    • Klantreferenties
    • Ondersteuning
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Vraag een demo aan
  • Prijzen
  • Help

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

  • CRM
  • e-Commerce
  • Boekhouding
  • Voorraad
  • PoS
  • Project
  • MRP
All apps
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Help

Datetime picker in website Odoo 12

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
datetimeodooV12
1 Beantwoorden
9619 Weergaven
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
Annuleer
Avatar
David Kovač
Auteur Beste antwoord

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
Annuleer
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!

Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!

Aanmelden
Gerelateerde posts Antwoorden Weergaven Activiteit
Difference Between Two Dates (result not showing up when diff = 0 Day)
datetime
Avatar
Avatar
Avatar
3
jun. 25
1956
Data Exceeded error while importing data in Odoo v12 Opgelost
odooV12
Avatar
Avatar
Avatar
Avatar
Avatar
4
mei 24
8282
date time DB
datetime
Avatar
Avatar
1
jul. 23
4760
Project and Timesheets
odooV12
Avatar
Avatar
1
jul. 23
2902
Accepting Bancontact payments through Paypal
odooV12
Avatar
Avatar
Avatar
3
jun. 23
3999
Community
  • Tutorials
  • Documentatie
  • Forum
Open Source
  • Downloaden
  • Github
  • Runbot
  • Vertalingen
Diensten
  • Odoo.sh Hosting
  • Ondersteuning
  • Upgrade
  • Gepersonaliseerde ontwikkelingen
  • Onderwijs
  • Vind een boekhouder
  • Vind een partner
  • Word een Partner
Over ons
  • Ons bedrijf
  • Merkelementen
  • Neem contact met ons op
  • Vacatures
  • Evenementen
  • Podcast
  • Blog
  • Klanten
  • Juridisch • Privacy
  • Beveiliging
الْعَرَبيّة 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 is een suite van open source zakelijke apps die aan al je bedrijfsbehoeften voldoet: CRM, E-commerce, boekhouding, inventaris, kassasysteem, projectbeheer, enz.

Odoo's unieke waardepropositie is om tegelijkertijd zeer gebruiksvriendelijk en volledig geïntegreerd te zijn.

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