Giter VIP home page Giter VIP logo

Comments (5)

VladimirMarkelov avatar VladimirMarkelov commented on May 31, 2024 1

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.

mikaelmello avatar mikaelmello commented on May 31, 2024

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.

KirkBuah avatar KirkBuah commented on May 31, 2024

Has there been any progress on this feature request?

from inquire.

mikaelmello avatar mikaelmello commented on May 31, 2024

hey @Kirgnition, unfortunately not. is there something specific you have in mind?

from inquire.

KirkBuah avatar KirkBuah commented on May 31, 2024

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)

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.