Comments (5)
I did not think about that side of the feature. Though, I can imagine when someone wants to block holidays. I am not sure how frequently it is used, so for the initial implementation I'd choose the first way with a validator.
from inquire.
That's an excellent idea. I've been meaning to add more capabilities to the calendar configuration besides min max dates.
Option 2 for me looks much better. At this moment I've just refactored the architecture to allow different backends (e.g. termion instead of crossterm) and the next step is to modularize the renderer, which will include 1. setting custom style sheets for each element, allowing you to set a custom color for today for example and 2. possibly implementing your own renderer given the prompt's state. Once I have an interface ready for that, the callback will be a simple addition.
As for your example, e.g. days already booked, what is the behavior you'd imagine to block their selections? Is this a job for the DateValidator
already present? Or would expect the user to not even be allowed to momentarily select (highlight) these dates, jumping to the next? Option 1 looks like the easiest/clearest approach and a nice compromise provided we have other ways (style) to highlight these dates.
from inquire.
Has there been any progress on this feature request?
from inquire.
hey @Kirgnition, unfortunately not. is there something specific you have in mind?
from inquire.
Hi @mikaelmello , I'm not sure if with my current understanding of the repo I'd be able to implement solution 2 proposed by @VladimirMarkelov . I would like to try to work on solution 1 and maybe issue a pull request if that sounds ok.
Sorry for the late response, I'm quite swamped with work in this period :)
from inquire.
Related Issues (20)
- Release HOT 1
- Use tty instead of stdin HOT 1
- with_starting_cursor does not apply HOT 2
- Fully support piped inputs in parallel with interactive inputs.
- Prompt crashes if program is run with crossterm+piped input+macos
- Add code coverage metrics to get a better idea of test coverage
- inquire derive and attribute macro HOT 3
- Show proper error message for CustomType prompt HOT 1
- Alt+{left, right, backspace} support HOT 3
- DateSelect default help message incorrect ? HOT 2
- Support for up-arrow previous prompt history, and control-keys HOT 2
- Inquire leaves the terminal in a broken state HOT 3
- Render issue using the `console` backend HOT 2
- Inquire forgets to add newlines in 0.7.1 HOT 5
- "external_print" Functionality
- Make Scrolling More Obvious (Customizable maybe?) HOT 1
- MultiSelect list doesn't show after filter is cleared on selection HOT 1
- Suppressing static lifetimes from Text (and other modules ?) HOT 1
- typo in README for termion link
- Password prompt with redirected `stdout`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from inquire.