Code Monkey home page Code Monkey logo

reflex-calendar's Introduction

calendar

A Reflex custom component calendar wrapping the react-calendar component.

Installation

pip install reflex-calendar

Usage

from reflex_calendar import calendar

def index():
    return calendar()

Props:

  • go_to_range_start_on_select: Go to the start of the range when selecting a range.
  • value: The date value.
  • locale: The locale.
  • min_date: The minimum date.
  • max_date: The maximum date.
  • min_detail: The minimum detail.
  • max_detail: The maximum detail.
  • navigation_label: The navigation label.
  • next2_label: The next2 label.
  • next_label: The next label.
  • prev2_label: The prev2 label.
  • prev_label: The prev label.
  • select_range: The select range.
  • show_double_view: Show double view.
  • show_fixed_number_of_weeks: Show fixed number of weeks.
  • show_navigation: Show navigation.
  • show_neighboring_month: Show neighboring month.
  • show_neighboring_century: Show neighboring century.
  • show_neighboring_decade: Show neighboring decade.
  • show_week_numbers: Show week numbers.

Event triggers:

  • on_change: Triggered when the date is changed. (return the date)
  • on_click_day: Triggered when a day is clicked. (return the full date)
  • on_click_month: Triggered when a month is clicked. (return a date at start/end of the month)
  • on_click_year: Triggered when a year is clicked. (return a date at start/end of the year)
  • on_click_decade: Triggered when a decade is clicked. (return a date at start/end of the decade)
  • on_click_week_number: Triggered when a week number is clicked. (return a date at start/end of the week)
  • on_drill_down: Triggered when the calendar is drilled down. (return the event)
  • on_drill_up: Triggered when the calendar is drilled up. (return the event)
  • on_view_change: Triggered when the view is changed. (return the event)

When returning an event, it's a dictionary with the following keys:

  • action: The action.
  • activeStartDate: The start date in the resulting view.
  • value: The value.
  • view: The view where the event happened.

reflex-calendar's People

Contributors

lendemor avatar

Stargazers

Abdel Balla avatar  avatar Jairo Morales Pérez avatar Francisco Cabrita avatar Nikhil Rao avatar Alek Petuskey avatar  avatar Martin Auckenthaler avatar

Watchers

 avatar

reflex-calendar's Issues

Using the range functionality

Hi. I am having trouble accessing the range return value and using it to update a state variable in my Reflex app. I'm getting this error in the reflex logs — TypeError: _date.toDateString is not a function
Here is my code:
calendar( calendar_type = "gregory", select_range = True, return_value="range", value = State.range, on_change = State.update_range)

Any help would be appreciated!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.