GithubHelp home page GithubHelp logo

onx2 / s-date-range-picker Goto Github PK

View Code? Open in Web Editor NEW
12.0 1.0 3.0 2.85 MB

πŸ“… A date range picker built with Svelte

License: MIT License

JavaScript 41.87% HTML 0.35% Svelte 56.40% SCSS 1.38%
svelte sveltejs svelte-v3 svelte3 svelte-components svelte-js datepicker datetimepicker date-picker date-range-picker

s-date-range-picker's People

Contributors

dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

wolfr anito

s-date-range-picker's Issues

Any official maintained fork of this

Since this main repo is officially unmaintained I wish to know if somebody already have a maintained for of this.
Since still there are many pending pull request currently

Best Regards!

Add disabled prop/option

This could be used regardless of the show/hide functionality to totally disable everything on the picker, like a read-only mode.

If this was in a read-only mode, should the UI be simpler?

Type: boolean

Improve documentation

Document the props and events with the name, short description, expected type, and potentially a link to the demo site when it is active.

Show examples of how to consume using Svelte as well as a standalone component.

Smarter dynamic width for picker

Currently the picker only takes into account the number of pages it is presenting to determine width. However, the width could also take into account whether the props for weekGuides, weekNumbers, and isoWeekNumbers are true.

This may also involve reworking some css as the positioning of the week numbers and iso week numbers may need tinkering.

Ideally the padding would be removed for the side info that isn't presented, as well as the width taking into the account the removed padding.

Example screenshot of the current "too much padding" method
image

Add the predefinedRanges prop/option

Provide a prop to the consumer that allows them to pass an array of predefined ranges. Each range should contain a start and end date as well as a title / name.

This array could then be used to add the UI for the ranges to the picker.

Bonus: let the user choose the layout / position?

Type: Array

Review accessibility / Usability

Is this component consumable by any user?
Is it friendly to screen readers?
Is it keyboard accessible?
Is the html markup semantic?
Are there any frustrating experiences using any piece of functionality in the component?

Add a maxSpan prop/option

This prop would prevent the user from selecting a range that spans past a given number of days/hours/minutes/seconds.

Type: potentially number (in days), if hours, mins, secs aren't concerned.

package in npmjs is outdated

package in npmjs version is 0.3.0
when i import from npmjs, show me a error Uncaught TypeError: Class constructor te cannot be invoked without 'new'

when i import from github, it's ok. but u don't push build in the repositoryπŸ˜‚

Add a prop for disabling isPrevMonth / isNextMonth selection

Right now it is possible to select the next month from within the current month. This is because to render the calendars always with the same number of days it requires 6 weeks. However, providing the consumer the ability to toggle their select-ability on/off would make the component more flexible.

When the day meta data is built, the isDisabled could check for this prop.

Show & hide functionality

Create a pop up style interaction using a button that shows the currently selected date.

  • Smooth animation
  • Lightweight footprint
  • Can click "out" of to hide

Questions
Should this use another library or hand-code?
Should this even be a part of this component? If not, the consumer could potentially use the $set() functionality to update the temp state.

Remove code related to show and hide

Related to: #7

Show / hide functionality shouldn't be a part of this component. It can be implemented in many different ways so it should be left up to the consumer.

$set functionality in JS apps can be used to reset or reactivity in svelte components can be used.

Optimizations!

How small can this thing be made?!

Can the HTML, CSS, or JS performance, size, or structure be improved?

Improvements

Reference #26

  • Remove need for hoverDate
  • Remove unnecessary hasSelection references
  • Simplify <TimePicker> html in <SDateRangePicker>

Add an events prop/option

Should the consumer have the ability to provide a list of events that could show on the calendar?

It could be a few colorful circles inside the date circle.

Type: Array

preprocess global scss into css build folder

This is part of the theming capability. There can be a few predefined themes that are optional, alongside the required styling within the svelte components. The consumer can either link to the css file or use their own.

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.