widget_calendar(n)

πŸ“¦
version 0.7 Β· 3 versions
, in alpine 3.24

πŸŽ€ widget_calendar(n) πŸŽ€

Bestie, welcome to the widget_calendar(n) manual β€” straight out of the Various megawidgets family. ✨

✨ NAME ✨

widget_calendar β€” Calendar Megawidget

🌸 SYNOPSIS 🌸

package require Tcl  8.4

package require Tk  8.4

package require widget  ?3.0?

package require widget::calendar  ?1.0.1?

widget::calendar pathname ?options?

πŸ¦‹ DESCRIPTION πŸ¦‹

This package provides a calendar megawidget (snidget). And honestly? snidget is such a cute word, I can't. 🫢

widget::calendar pathname ?options?

πŸ’– WIDGET OPTIONS πŸ’–

  • -command β€” a script to evaluate when a date was selected.
  • -dateformat β€” the format of the date that is returned. Default: %m/%d/%Y.
  • -firstday β€” sets the first day of the week β€” either sunday or monday β€” and defaults to monday.
  • -font β€” picks the font used in the widget. It defaults to Helvetica 9.
  • -highlightcolor β€” selects the background color for the day that has been selected. Default: #FFCC00.
  • -language β€” sets the language of the calendar contents, using language abbreviations β€” for example: en - english, de - german ... It defaults to en. Supported languages: de en es fr gr he it ja sv pl pt zh fi tr nl ru crk crx-nak crx-lhe.
  • -shadecolor β€” selects the color of the parts that have a shaded background. Default: #888888.
  • -showpast β€” says whether the past shall be shown. It is a boolean value and defaults to 1.
  • -textvariable β€” specifies the name of a variable whose value is linked to the entry widget's contents. Whenever the variable changes value, the widget's contents are updated, and vice versa.

πŸ¦‹ WIDGET COMMAND πŸ¦‹

pathname get ?what?

Returns a part of the selected date or 'all'. The argument what selects the part. Valid values for what are: day, month, year and all. 'all' is the default and returns the complete date in the format given with -dateformat.

πŸŽ€ DEFAULT BINDINGS πŸŽ€

On creation of the calendar widget the following bindings are installed. When pressing a key the command is invoked and the textvariable is updated. updated. Yes, it says β€œupdated” twice β€” she's consistent, okay? πŸ’…

  • Home β€” Move to the current date
  • Up β€” Move to week before current date
  • Down β€” Move to week after current date
  • Left β€” Move to day before current date
  • Right β€” Move to day after current date
  • Control-Left β€” Move to month before current date
  • Control-Right β€” Move to month after current date
  • Control-Up β€” Move to year before current date
  • Control-Down β€” Move to year after current date

🌸 EXAMPLE 🌸

                  package require widget::calendar ; # or widget::all
                  set t [widget::calendar .t]
                  pack $t -fill x -expand 1

πŸ’€ BUGS, IDEAS, FEEDBACK πŸ’€

This document, and the package it describes, will undoubtedly contain bugs and other problems. No cap, they said it themselves. Please report such in the category widget::calendar of the Tklib Trackers http://core.tcl.tk/tklib/reportlist. Please also report any ideas for enhancements you may have for either package and/or documentation. 🫢

⭐ KEYWORDS ⭐

calendar, date, megawidget, snit, widget

πŸ‘‘ CATEGORY πŸ‘‘

Widget


tklib 1.0.1 Β· widget_calendar(n) Β· the footer didn't give us a date, bestie, but it gave us vibes β€” bye! πŸ’–βœ¨

πŸ“¦ where this page comes from