Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

django datepicker mindate and maxdate

from django import forms
from .models import Booking

import datetime


class BookingForm(forms.ModelForm):
    class Meta:
        model = Booking
        fields = ('booking_name', 'rental_price',
                'book_car', 'customer_name', 'times_pick',)
        widgets = {
            'times_pick': DateTimePickerInput(
                options={
                    'minDate': (datetime.datetime.today() + datetime.timedelta(days=1)).strftime('%Y-%m-%d 00:00:00'),
                    'maxDate': (datetime.datetime.today() + datetime.timedelta(days=2)).strftime('%Y-%m-%d 23:59:59'),
                    'enabledHours': [8, 9, 10, 11, 12, 13, 14, 15, 16, 17],
                }
            ),
        }
Comment

PREVIOUS NEXT
Code Example
Python :: 12000000/12 
Python :: remove all the valu ein dict exacpt provided key pythn 
Python :: username__icontains in django 
Python :: pylatex add section without numbering 
Python :: say something in discord discord.py 
Python :: how to open a different version of python on my macc 
Python :: what is mapping in os 
Python :: py - count if a word is present in a column 
Python :: tuto date and time python 
Python :: Applies a function to all elements of this RDD. 
Python :: how to let the user input desmials in python 
Python :: somma array python 
Python :: get id widget tkinter 
Python :: python seaborn violin stack overflow 
Python :: getting range lowest and highest values from np array 
Python :: fsting in python 
Python :: IS Dashie a name 
Python :: pandas remove rows based on DATETIME column year 
Python :: existing session SeleniumLibrary Instance.open_browser 
Python :: how to get list from comma separated string in python 
Python :: Blender Python set center to center of mass 
Python :: convert c++ code to python 
Python :: weighted averae multiple columns 
Python :: lllll 
Python :: python to java converter 
Python :: python for comparing url path 
Python :: multigreading sys.exit does not work 
Python :: what hormone causes the feeling of love 
Python :: no module named cbor2 windows 
Python :: python class udp 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =