Create A Date Picker Calendar - Python Tkinter GUI Tutorial #72

Поділитися
Вставка
  • Опубліковано 16 жов 2024

КОМЕНТАРІ • 187

  • @Codemycom
    @Codemycom  4 роки тому +1

    ▶️ Watch Entire Tkinter Playlist ✅ Subscribe To My UA-cam Channel:
    bit.ly/2UFLKgj bit.ly/2IGzvOR
    ▶️ See More At: ✅ Join My Facebook Group:
    Codemy.com bit.ly/2GFmOBz
    ▶️ Learn to Code at Codemy.com ✅ Buy a Codemy T-Shirt!
    Take $30 off with coupon code: youtube1 bit.ly/2VC9WUN

  • @ericmcdonough8193
    @ericmcdonough8193 4 роки тому +3

    i'm thoroughly enjoying you courses, and you're right it was insanely cheap. had been getting let down in my search for a good date picker until you posted this - thank you so much!

  • @nicolasdegaudenzi2802
    @nicolasdegaudenzi2802 Рік тому +1

    Thank you very much John!! Little by little I am learning more with your tutorials and allows me to continue develeoping my program application.

  • @kapibara2440
    @kapibara2440 4 місяці тому

    For years later, in June 2024, it is still a worthy video! 😊

  • @DB-pd1ls
    @DB-pd1ls 4 роки тому +2

    Hi! This video was so useful for my project! Thank you! My question:
    if I want to make the same calendar as you did but more like a schedule for opening hours and different activities for a specific season, how can I do this? For example, when I press on the dates between 2020-11-01 to 2021-02-28, I want to get a specific output on the screen for that period: example: "We open between 10 am to 8 pm; and the activitis for today is..." and then if I press 2021-03-01 to 2021-05-31, I want to get another output etc.

  • @exactbrain6248
    @exactbrain6248 4 роки тому +3

    youve been alot of help towards my career thanks, with following your tutorial i learnt how to use any templates and django as backend,actually i am stuck in my templates because i go beyond what you taught,i am creating a photo gallery webiste but using django admin to upload for example ,once you go in the website you are seeing 5 or more parent image in which if you open each it redirect you to child pictures, i have managed to make one to work properly,but i dont know to pass the rest to my view and loop it in my templates,but if i do it excatly like i did do the first one the parent images will all show but once i click i get an error,so please tell me what to use in my template

    • @Codemycom
      @Codemycom  4 роки тому

      Sorry, not sure what you mean. If you create new template pages, it's just a matter of the html on that page as to how it looks.

    • @exactbrain6248
      @exactbrain6248 4 роки тому

      @@Codemycom no sir,its not about templates,I downloaded a photo gallery website but I dont want to use the static images,so I decided to create a model and using inline and it went well,so I pass in my models to view.py, my problem is how would I pass in all the multiple images to my view and using a forloop in my template to make all of my models working

    • @exactbrain6248
      @exactbrain6248 4 роки тому

      @@Codemycom pastebin.com/cV4ki8SL here is my code sir kindly take a look ,I want to pass in everything in my models to my view and templates because if I repeat myself I do see errors

    • @exactbrain6248
      @exactbrain6248 4 роки тому

      I pass one of them in my view and templates and it works well but if I pass all of them it wont work well

  • @robh9184
    @robh9184 4 роки тому +3

    Hi John. Thanks again for another great video. I refer to your videos often when creating my own fun things. Is it possible to print your pages from tkinter? or perhaps create a pdf so that we can then print? Keep up the good work!

    • @Codemycom
      @Codemycom  4 роки тому

      Sure, but it's too complicated to explain in a text post like this...

    • @robh9184
      @robh9184 4 роки тому +1

      @@Codemycom Great to hear! Perhaps one for the future :) 'How To Export Tkinter window To PDF - Python Tkinter GUI Tutorial #283'

    • @Codemycom
      @Codemycom  4 роки тому +1

      @@robh9184 good suggestion

  • @Python_in_UA
    @Python_in_UA 2 роки тому

    Super!
    Thanks.
    Nobody shows that tk has buulting Calendar!

  • @AjmalKhan-mq3fg
    @AjmalKhan-mq3fg 4 роки тому

    Dude you made things so easy, great work

  • @imagnihton2
    @imagnihton2 2 роки тому

    Amazing video..amazing explanation!! Helped a lot! Thanks a mill. !!

  • @TheBhartiyaTrainee
    @TheBhartiyaTrainee 4 роки тому +2

    Hi, Thanks a lot for such an amazing tutorial video.

    • @Codemycom
      @Codemycom  4 роки тому

      You are welcome!

    • @9dsong782
      @9dsong782 3 роки тому

      ​@@Codemycom unable to import 'tkcalendar' in using windows

  • @devenjain7116
    @devenjain7116 3 роки тому +5

    5:34 The date format is "MM-DD-YYYY". How to change that? I want it to be "DD-MM-YYYY" as it is most commonly used in my country

    • @codeKeshav
      @codeKeshav 3 роки тому +3

      cal = Calendar(root, selectmode="day", date_pattern="dd-mm-yyyy")

    • @devenjain7116
      @devenjain7116 3 роки тому +2

      @@codeKeshav thank u

  • @pleabargain
    @pleabargain Рік тому

    How about importing a list of calendar values to populate a calendar? cal_value1 = {date:"2022DEC29",desc:"yay day"} calendar date has a change of color and description on side?

  • @snigelbad5255
    @snigelbad5255 2 роки тому

    Is it possible to make a calendar for only a specific year? Which would mean the user can't change the year, but still able to change the month and day

  • @shukuchihikaru8808
    @shukuchihikaru8808 Рік тому

    Hi! I learned a lot of things but is there anyway how to not overlap dates or get same exact dates?

  • @panz1skate
    @panz1skate Рік тому

    Hi, is there a way to not pick any date? And in that case, which value does the calendar return?

  • @mozartiano123
    @mozartiano123 3 роки тому

    it served me very well. Thanks a lot.

  • @devenjain7116
    @devenjain7116 3 роки тому +1

    Is it possible to house the calendar date picker inside a tiny button that if we click on opens up the calendar itself and then we can do out stuff? Like it happens in those professional websites

    • @Codemycom
      @Codemycom  3 роки тому +1

      sure..I have videos on opening other windows on the playlist

    • @devenjain7116
      @devenjain7116 3 роки тому +1

      @@Codemycom Will check them out, thank you so much for always helping and replying on time, really appreciate it!

  • @andreamarchisio9608
    @andreamarchisio9608 3 роки тому

    This guy is a legend

  • @reyhanehsharbaf6957
    @reyhanehsharbaf6957 4 роки тому

    Thank you very much ! That was a nice tutorials

  • @ragheedmaloyan3730
    @ragheedmaloyan3730 2 роки тому

    Hi,
    first thank you for all the videos that you upload.
    I was trying to use this video in one of my projects, but I noticed it doesn't update the second day, I have to close it and open it again.
    I used schedule but failed. Can you please give me some instructions or if you can update this video with something can be running 24/7/365.
    Regards,

  • @mrnobody7054
    @mrnobody7054 2 роки тому

    Thank you so very much for explaining this Walter White was very much needed! By the way how is Hank Schrader?

  • @tomicarlin9432
    @tomicarlin9432 4 роки тому

    how would you be able to choose 2 dates parameter within the calendar as a range? like you would in a flight search calendar

  • @vaishnavis4205
    @vaishnavis4205 11 місяців тому

    Is it possible to have date entry with only month names?

  • @kaseox5436
    @kaseox5436 2 роки тому

    Can we change output ? For example we have output month/day/year but i need day/month/year also i need 2022 not 22. We have 10/6/22 i need output 6/10/2022. Can we do something like this?

  • @talesofss3505
    @talesofss3505 3 роки тому

    I want two 'Date Picker'. One for 'From' and the other for 'To'
    Then I want to use these dates as a filter for data analysis. - currently, I have to type the date manually in the code
    Can we do it?

  • @manjeetchahal0991
    @manjeetchahal0991 5 місяців тому

    Hi , but I am getting an error on from Tak calendar import *
    Error is. No module name tkcalendar.
    Kindly help

  • @georgegil26
    @georgegil26 4 роки тому

    Hi , thank a lot for this tutorial, it was super usefull

  • @anshikasharma567
    @anshikasharma567 3 роки тому

    I want to tell three words to you:
    Thanks,Thanks,Thanks

    • @Codemycom
      @Codemycom  3 роки тому

      You're welcome welcome welcome!

  • @judeleon8485
    @judeleon8485 4 роки тому

    Thanks. Quite explanatory. Is it possible to have drop-down calendar, as we usually have it in web forms? I mean the type that you click a button and have the date picker appear, and after you select date, the date picker disappears, instead of permanently being displayed

    • @Codemycom
      @Codemycom  4 роки тому

      Sure, it would take some coding, but I don't imagine it would be that hard...

  • @RyanDanielG
    @RyanDanielG 3 роки тому

    feed the algorithm! great vid

  • @jaredmalan8625
    @jaredmalan8625 2 роки тому

    how would you install that on vscode on a macbook? I've been looking everywhere and can't seem to find a way that works to install tkcalendar...

    • @Codemycom
      @Codemycom  2 роки тому

      I wouldn't. Don't use vscode

  • @markal3023
    @markal3023 4 роки тому

    Thanks for this tutorial. Could you expand on it a bit and incorporate it in your database series for use in selecting it as a pop up when you have a field requiring a date selection. I.e. date joined or date of purchase. How about the calendar pops up as soon as the date field is selected. Great to ensure date is captured in the right format. D/M/Y etc. I tried and sort of got it to work but not really happy with result. Had to use a button to click to get calendar to pop up rather than clicking on the entry box. Is that possible even?

    • @Codemycom
      @Codemycom  4 роки тому

      You basically have the info to do that yourself now...maybe bind the entry box?

  • @mujassimjamal24
    @mujassimjamal24 4 роки тому +1

    Sir can we make a website using tkinter??
    And thanx for this awesome video ❤

    • @Codemycom
      @Codemycom  4 роки тому +1

      No you can't. Tkinter is desktop software.

    • @shivensaini3643
      @shivensaini3643 4 роки тому +1

      You can't build website using tkinter. you have to use HTML and CSS.
      If you want to know more you can ask me.
      You can ask me any type of doubt related to python & tkinter.

  • @AnujKumar-xn5tg
    @AnujKumar-xn5tg 4 роки тому

    For real date value can we use date module
    Which automatically set the present date?

  • @시간속으로-s3k
    @시간속으로-s3k Рік тому

    Thank You~~As Always~~!!

  • @piyushadwani371
    @piyushadwani371 2 роки тому

    your code is not working from the line cal=Calendar(......
    It's showing that Calendar is not defined and I have the tkcalendar library too.
    what's the problem?

    • @Codemycom
      @Codemycom  2 роки тому

      You typed something incorrectly somewhere.

  • @digitalmachine0101
    @digitalmachine0101 4 місяці тому

    Good information

  • @lisamiller9468
    @lisamiller9468 4 роки тому

    The tutorial looks great. I'm using Visual Studio 2019 but it cannot find the tkcalendar module. Any advice?

    • @lisamiller9468
      @lisamiller9468 4 роки тому

      The error that I get is:
      ----- Installing 'tkcalendar' -----
      WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/tkcalendar/
      WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/tkcalendar/
      WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/tkcalendar/
      WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/tkcalendar/
      WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/tkcalendar/
      ERROR: Could not find a version that satisfies the requirement tkcalendar (from versions: none)
      ERROR: No matching distribution found for tkcalendar
      ----- Failed to install 'tkcalendar' -----

    • @Codemycom
      @Codemycom  4 роки тому

      @@lisamiller9468 don't use visual studio lol I just use regular free sublime and the free git bash terminal

    • @lisamiller9468
      @lisamiller9468 4 роки тому

      @@Codemycom Ok, thanks. Love your videos.

    • @Codemycom
      @Codemycom  4 роки тому

      @@lisamiller9468 Thanks! :-)

  • @walthansen6333
    @walthansen6333 3 роки тому

    Is it possible to get this to update the selected date automatically, i.e., if this is running past midnite, it changes the selected date to the next day.

  • @miles45ful
    @miles45ful 3 роки тому

    Is it possible to change the formatting of the "get_date()"? So I can compare it to other strings?

    • @skylinefx049
      @skylinefx049 3 роки тому +2

      cal = Calendar(root, date_pattern='dd-mm-y')

  • @prithviraj141
    @prithviraj141 3 роки тому +1

    Hi, I really found this video very useful. but i have one query, so the date output here is in (mm/dd/yy) format but i want the date in (mm/dd/yyyy) format, how can i get it ? can anyone help ?
    Thanks!

  • @justone4272
    @justone4272 4 роки тому +1

    Thank you sooo much!

    • @Codemycom
      @Codemycom  4 роки тому

      You’re very welcome!

    • @justone4272
      @justone4272 4 роки тому

      @@Codemycom 😃

    • @Codemycom
      @Codemycom  4 роки тому

      @@justone4272 :-)

    • @justone4272
      @justone4272 4 роки тому

      @@Codemycom Also, one last question, is it possible to connect widgets like entries to the days in the calendar?
      (Sorry to bother you again.)

    • @Codemycom
      @Codemycom  4 роки тому

      @@justone4272 Sure...I did a video in the playlist on a clock...look at that..date and time are sort of tied together

  • @eshaangupta4101
    @eshaangupta4101 4 роки тому

    Thanks helped a lot

  • @sainagabharat79
    @sainagabharat79 4 роки тому

    Nice tutorial. Thank you.
    How to use dateentry and get date value to a variable?
    I want to pass that variable as a parameter in the function.

    • @StevenLightning
      @StevenLightning 3 роки тому +1

      If you want the date as a string you can do something like str_date = your_date_entry_widget.get_date().strftime("%d/%m/%Y")
      If you just want the date object you can drop the strfrtime bit at the end.

  • @dimitriosdesmos4699
    @dimitriosdesmos4699 4 роки тому

    How would you pop that up in a dropmenu....most calendars dont pop up in frames, you click the dropdown menu calendar and it pops up right under that?? thanks

    • @Codemycom
      @Codemycom  4 роки тому

      The same way you pop up any window...

    • @dimitriosdesmos4699
      @dimitriosdesmos4699 4 роки тому +1

      @@Codemycom is there anything like this? stackoverflow.com/questions/41598292/gtk-time-picker-widget

    • @ClusterSeries
      @ClusterSeries 4 роки тому

      use 'DateEntry' instead of 'Calendar' while defining the widget.

  • @Shawn-on7ej
    @Shawn-on7ej 3 роки тому

    Is there a way to display the chosen date and other dates below it for example: Todays Date and then Date 30 days after chosen date? Thanks!

    • @Codemycom
      @Codemycom  3 роки тому

      Sure, do a little math

    • @Shawn-on7ej
      @Shawn-on7ej 3 роки тому

      @@Codemycom Is there a particular way though?

    • @Codemycom
      @Codemycom  3 роки тому

      @@Shawn-on7ej No, just use regular math to add 30 days and output it

    • @Shawn-on7ej
      @Shawn-on7ej 3 роки тому

      @@Codemycom Nice thanks 👍

    • @Shawn-on7ej
      @Shawn-on7ej 3 роки тому

      @@Codemycom where would I implement the maths?

  • @stevemarten3383
    @stevemarten3383 3 роки тому

    Pls can we do it without a default date ?

  • @milosmarinkovic1643
    @milosmarinkovic1643 4 роки тому

    It was a nice video, but when I want to set textvariable on my label to get that date out for some reason it doesn't work any solution?

    • @Codemycom
      @Codemycom  4 роки тому

      Check your code for typos

  • @renatoandrade6735
    @renatoandrade6735 3 роки тому

    How can I change the button "get date" to double click event in the date? I think that is more easier than click in a button. Sorry form my horrible English.

  • @atithi8
    @atithi8 4 роки тому

    I wish I was looking at this on a Friday

  • @theprowlergaming7966
    @theprowlergaming7966 2 роки тому

    Sir recently im getting error as no module found while its installed correctly, looked everywhere cnt fix it , i tried everything that i could find as a solution, no module named "tkcalendar". please help me sir.

    • @Codemycom
      @Codemycom  2 роки тому

      are you using a virtual environment? You must use the tools I use too.

  • @randifehrn2097
    @randifehrn2097 4 роки тому

    I would like to be able to mark several days at once and then view the selected days. how do you do it?

    • @williamsxvi20
      @williamsxvi20 2 роки тому

      Allow the user to select multiple days then return those days into a tuple or list.

  • @coolsav0074
    @coolsav0074 3 роки тому +1

    how to covet the cal.selection_get into string?

    • @Codemycom
      @Codemycom  3 роки тому +1

      str(cal.selection_get) or something like that

  • @_TheDudeAbides_
    @_TheDudeAbides_ 7 місяців тому

    Only problem I met so far is that if I put this in functions, the grab_date function no longer knows what my_label is and it does not exist before the button is clicked so it is weird.

    • @Codemycom
      @Codemycom  7 місяців тому

      Yeah, that's how functions work.. they don't exist until you run them (ie click the button)

  • @josemoraila
    @josemoraila 9 місяців тому

    from tkcalendar import Entry
    ModuleNotFoundError: No module named 'tkcalendar'
    I installed but it doesnt work

    • @Codemycom
      @Codemycom  9 місяців тому

      from tkcalendar import Entry
      What the heck is that? Why?

  • @thepascalvictor
    @thepascalvictor 2 роки тому

    i cant pip install tkcalendar for vscode.. reqirement not found

  • @dimitriosdesmos4699
    @dimitriosdesmos4699 4 роки тому

    very useful.

  • @harshraval180
    @harshraval180 4 роки тому +7

    Walter White ?

  • @piyalisen2993
    @piyalisen2993 4 роки тому

    Can we get the selected date into a variable?

    • @Codemycom
      @Codemycom  4 роки тому

      Of course

    • @piyalisen2993
      @piyalisen2993 4 роки тому

      @@Codemycom I have tried but couldn't get it, can u provide a simple code

    • @johngiangrande2996
      @johngiangrande2996 4 роки тому

      d = cal.get_date() # is that what you were looking for?

  • @RufusVidS
    @RufusVidS Рік тому

    I need to have an input display that inputs both date AND time. tkcalendar only does date, AFAICT

    • @Codemycom
      @Codemycom  Рік тому

      You can pull time from Python anytime you want. import time or datetime

    • @RufusVidS
      @RufusVidS Рік тому

      @@Codemycom Of course, but I was talking about a GUI time picker, like tkCalendar. I did find tkTimePicker, so I'm using that. It would have been nice to have an all-in-one timestamp picker with date and time, but I'll make due with the two separate moduless.

  • @saudaminisingh4069
    @saudaminisingh4069 Рік тому

    How to add different bgcolor on specific dates
    Please tell 🙏🙏

  • @jijusasidharan
    @jijusasidharan 4 роки тому

    Thanks !

  • @ClusterSeries
    @ClusterSeries 4 роки тому +1

    Sir, Can you please make a video on ttk ?.

    • @Codemycom
      @Codemycom  4 роки тому

      I have many videos on ttk widgets in the playlist already

    • @ClusterSeries
      @ClusterSeries 4 роки тому

      @@Codemycom But there's only a few of them...
      I'm glad there is some of it 😁

  • @ctrlz4439
    @ctrlz4439 2 роки тому

    Date selections are usually are dialogs. There is million tutorials how to create simple calendar in main window and none how to create it as dialog.

  • @blancou2179
    @blancou2179 4 роки тому

    Thank you for your tutorials!
    It is possible to have the display in the format day, month, year in text = "Aujourdhui la date est "+ cal.get_date()...
    Merci beaucoup !!!!

    • @Codemycom
      @Codemycom  4 роки тому

      One way or another, yes...maybe I'll do a video on it... :-)

    • @querola16
      @querola16 4 роки тому +4

      yes you can use date_pattern = "yyyy-mm-dd" in config calendar

    • @davidreviews8413
      @davidreviews8413 4 роки тому +2

      @@querola16 Thanks dude....I was just looking for this... Cause he didn't mention in the video about this.

  • @dominykas520
    @dominykas520 3 роки тому

    When I use get date i get this error
    AttributeError: 'Calendar' object has no attribute 'get_date'
    any ideas why?

    • @Codemycom
      @Codemycom  3 роки тому

      get_date should be get_date()

    • @alexisnieto8545
      @alexisnieto8545 3 роки тому

      I have the same error and my code is written as cal.getdate()

  • @akkir6707
    @akkir6707 3 роки тому

    what if i want to put the date to a listbox?

    • @Codemycom
      @Codemycom  3 роки тому +1

      You can do that, in the same way you add anything to it.

  • @hildac_r7814
    @hildac_r7814 4 роки тому

    thanks!!

  • @ajinkyasonwane4433
    @ajinkyasonwane4433 4 роки тому

    How to use tag option with calevent_create?

  • @levoyanc4530
    @levoyanc4530 4 роки тому

    Could you please make a seat reservation system using tkinter?

    • @Codemycom
      @Codemycom  4 роки тому +4

      Why not make it yourself :-p you should be able to with the info from my videos, no problem.

  • @rinsyarifuddin8696
    @rinsyarifuddin8696 4 роки тому

    Hey sir can you make a program to predict the date using tkinter

    • @Codemycom
      @Codemycom  4 роки тому +4

      How does one predict the date? lol read someone's mind and guess the date they are thinking? LOL

  • @charantechgeek
    @charantechgeek 4 роки тому

    1st view 1st like

  • @nathatkuanthanom9485
    @nathatkuanthanom9485 3 роки тому

    Why i can't import tkcalendar?

    • @Codemycom
      @Codemycom  3 роки тому

      you probably typed it wrong.

  • @dk_a_dev
    @dk_a_dev 3 роки тому

    Hey john

    • @dk_a_dev
      @dk_a_dev 3 роки тому +2

      Plz plz here John johnn hey I want a calendar on a drop-down box .....I think u got itt plz I need it as soon as possible plz ..I'm on a project.....

  • @pheasa4032
    @pheasa4032 3 роки тому

    i can't build to exe

  • @GuxBreno
    @GuxBreno 3 роки тому +2

    unable to import 'tkcalendar' im using windows

  • @9dsong782
    @9dsong782 3 роки тому

    unable to import 'tkcalendar' in using windows

    • @Codemycom
      @Codemycom  3 роки тому

      follow the video exactly.