İçereği Atla
Odoo Menü
  • Portal
  • Ücretsiz deneyin
  • Uygulamalar
    Finans
    • Muhasebe
    • Faturalama
    • Masraf Yönetimi
    • Elektronik Çizelge (BI)
    • Belgeler
    • İmza
    Satış
    • Müşteri İlişkileri Yönetimi (CRM)
    • Satış
    • Satış Noktası Mağaza
    • Satış Noktası Restoran
    • Abonelikler
    • Kiralama
    Web Sitesi
    • Web Sitesi Oluşturucu
    • eTicaret
    • Blog
    • Forum
    • Canlı Sohbet
    • eÖğrenme
    Tedarik Zinciri
    • Envanter
    • Üretim
    • Ürün Yaşam Döngüsü Yönetimi
    • Satın Alma
    • Bakım
    • Kalite
    İnsan Kaynakları
    • Çalışanlar
    • İşe Alım
    • İzin
    • Değerlendirme
    • Referans
    • Filo Yönetimi
    Pazarlama
    • Sosyal Medyada Pazarlama
    • E-posta ile Pazarlama
    • SMS ile Pazarlama
    • Etkinlikler
    • Pazarlama Otomasyonu
    • Anket
    Hizmetler
    • Proje Yönetimi
    • Çalışma Çizelgeleri
    • Saha Hizmeti
    • Yardım Masası
    • Planlama
    • Randevular
    Verimlilik
    • Sohbet
    • Onay
    • Nesnelerin İnterneti
    • VoIP
    • Bilgi Bankası
    • WhatsApp
    Üçüncü taraf uygulamalar Odoo Stüdyo Odoo Bulut Platformu
  • Sektörler
    Perakende satış
    • Kitapçı
    • Giyim Mağazası
    • Mobilya Mağazası
    • Gıda Marketi
    • Hırdavat Dükkanı
    • Oyuncak Dükkanı
    Gıda ve Konaklama
    • Bar ve Pub
    • Restoran
    • Fast Food Restoranı
    • Konuk Evi
    • İçecek Distribütörü
    • Otel
    Gayrimenkul
    • Emlak Acentesi
    • Mimarlık Firması
    • İnşaat
    • Emlak Yönetimi
    • Bahçe Tasarımı
    • Mülk Sahipleri Derneği
    Uzmanlık
    • Muhasebe Firması
    • Odoo Partner
    • Pazarlama Ajansı
    • Hukuk Firması
    • Yetenek Kazanımı
    • Denetim ve Belgelendirme
    Üretim
    • Tekstil
    • Metal
    • Mobilyalar
    • Gıda
    • Bira fabrikası
    • Kurumsal Hediye
    Sağlık ve Spor
    • Spor Kulübü
    • Optik Mağazası
    • Fitness Merkezi
    • Sağlıklı Yaşam Merkezi
    • Eczane
    • Kuaför Salonu
    Ticaret
    • Tamirci
    • BT Donanım & Destek
    • Güneş Enerjisi Sistemleri
    • Ayakkabı İmalatçısı
    • Temizlik Hizmetleri
    • HVAC Hizmetleri
    Diğerleri
    • Kar Amacı Gütmeyen Kuruluş
    • Çevre Ajansı
    • Reklam Panosu Kiralama
    • Fotoğrafçılık
    • Bisiklet Kiralama
    • Yazılım Bayisi
    Tüm Sektörlere Göz Atın
  • Topluluk
    Öğrenim
    • Eğitim Araçları
    • Dokümantasyon
    • Sertifikasyonlar
    • Eğitim Etkinlikleri
    • Blog
    • Podcast
    Eğitim ve Gelişim
    • Eğitim Programı
    • Scale Up! İşletme Oyunu
    • Odoo'yu Ziyaret Edin
    Yazılım
    • İndirin
    • Sürümleri Kıyaslayın
    • Sürümler
    İş Birliği
    • Github
    • Forum
    • Etkinlikler
    • Çeviriler
    • Partner Olun
    • Partnerler için Hizmetler
    • Muhasebe Firmanızı Kaydettirin
    Hizmetler
    • Partner Bulun
    • Muhasebeci Bulun
    • Bir danışmanla görüşün
    • Kurulum Hizmetleri
    • Müşteri Referansları
    • Destek
    • Sürüm Yükseltme
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Demo randevusu alın
  • Fiyatlandırma
  • Yardım

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

  • Müşteri İlişkileri Yönetimi
  • e-Commerce
  • Muhasebe
  • Envanter
  • PoS
  • Proje Yönetimi
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
Yardım

Change min date and max date in datepickers Odoo 9

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
datewidgetoptionsdatepickerodoo9
8317 Görünümler
Avatar
Jorge

Hello!, I have a little problem I would like restrict years for choose in date pickers, previous year like min date and actual year like max date, I downloaded this module:

https://apps.odoo.com/apps/modules/9.0/web_widget_datepicker_options/


This module allows change the options of datepicker/datetimepicker in a specific date/datetime field, This module has this .js file:


odoo.define('web_widget_datepicker_options', function (require) {

    "use strict";

    var core = require('web.core');

    var DateTimeWidget = require('web.datepicker').DateTimeWidget;

    var DateWidget = require('web.datepicker').DateWidget;

    DateTimeWidget.include({

        start: function(parent, options) {

                this._super.apply(this, arguments);

                var self = this;

                if (this.__parentedParent.options.datepicker) {

                    var options = this.__parentedParent.options.datepicker;

                    $.each(options, function(value, key) {

                        self.options[value] = key;

                        self.picker[value] = key;

                        self.picker.options[value] = key;

                    });

                }

            },

});


DateWidget.include({

    start: function(parent, options) {

        this._super.apply(this, arguments);

        var self = this;

        if (this.__parentedParent.options.datepicker) {

                var options = this.__parentedParent.options.datepicker;

                $.each(options, function(value, key) {

                    self.options[value] = key;

                    self.picker[value] = key;

                    self.picker.options[value] = key;

                });

            }

        },

    });

});


And It provides a xml demo for use the module:

<?xml version="1.0" encoding="utf-8"?>

<odoo>

    <record id="datepicker_options" model="ir.ui.view">

        <field name="name">datepicker_options</field>

        <field name="model">res.users</field>

        <field name="inherit_id" ref="base.view_users_form"/>

        <field name="arch" type="xml">

            <xpath expr="//page[@name='access_rights']" position="inside">

                <h2>Datepicker Demo</h2>

                <label for="date"/>

                <field name="date" options='{"datepicker": {" calendarWeeks ": false}}'/><br/>

                <label for="create_date"/>

                <field name="create_date" options="{'datepicker':{'calendarWeeks': false}}"/>

            </xpath>

         </field>

    </record>

</odoo>


In the demo It uses the "calendarWeeks" option that if You set "True" It shows the number of the week in the left side of the calendar, by default Odoo shows in the datepicker a minDate and a maxDate, the minDate is the year 1900 and the maxDate is 100 years more from today.

In the demo I tried change the options with this:

{"minDate": "-1y"} (following the Datepicker API that the module provides  http://api.jqueryui.com/datepicker/


But when I try input data in the date field I get the following error:

Uncaught TypeError: picker.options.minDate.year is not a function

Someone could help me? Thanks!!



0
Avatar
Vazgeç
Enjoying the discussion? Don't just read, join in!

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

Üye Ol
İlgili Gönderiler Cevaplar Görünümler Aktivite
Is there a way to select only years and months in the date field?
date widget datepicker odoo17
Avatar
Avatar
1
Tem 24
36
Change min date and max date in datepickers Odoo 9
date datepicker restriction year odoo9
Avatar
Avatar
1
Oca 18
5086
Inherit Datepicker widget and add new functionality
widget datepicker
Avatar
0
Kas 24
1833
Islamic\Hijri date picker for odoo 15?? Çözüldü
widget datepicker
Avatar
Avatar
1
Eki 22
3646
Disable Dates after Today
date datepicker
Avatar
1
Ara 19
10571
Topluluk
  • Eğitim Araçları
  • Dokümantasyon
  • Forum
Açık Kaynak
  • İndirin
  • Github
  • Runbot
  • Çeviriler
Hizmetler
  • Odoo.sh Hosting
  • Destek
  • Sürüm Yükseltme
  • Özel Geliştirmeler
  • Eğitim
  • Muhasebeci Bulun
  • Partner Bulun
  • Partner Olun
Hakkında
  • Şirketimiz
  • Pazarlama Gereçleri
  • İletişim
  • Kariyer
  • Etkinlikler
  • Podcast
  • Blog
  • Müşteriler
  • Hukuki • Gizlilik
  • Güvenlik
الْعَرَبيّة 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, müşteri ilişkileri yönetimi, eTicaret, muhasebe, envanter, satış noktası, proje yönetimi gibi şirketinizin tüm ihtiyaçlarını karşılayan bir açık kaynak işletme uygulamaları paketidir.

Odoo’nun eşsiz değer önermesi, aynı anda hem kullanımının çok kolay olup hem de tamamen entegre olmasıdır.

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