Giter VIP home page Giter VIP logo

Comments (16)

tbee avatar tbee commented on September 25, 2024

CalendarPicker has a disabledCalendars property. You can register a callback in the calendarRangeCallbackProperty and set the disabledCalendars accordingly.

from jfxtras.

millmanorama avatar millmanorama commented on September 25, 2024

that you for the quick reply. I am using a LocalDateTimeTextField, is
there a corresponding feature for it?

On Mon, May 5, 2014 at 11:29 AM, Tom Eugelink [email protected]:

CalendarPicker has a disabledCalendars property. You can register a
callback in the calendarRangeCallbackProperty and set the disabledCalendars
accordingly.


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-42200261
.

Jonathan Millman
www.jmillman.com

from jfxtras.

tbee avatar tbee commented on September 25, 2024

There should be (because I reuse CalendarPicker everywhere) but I see the property is not forwarded. So that would need a small extension.

from jfxtras.

tbee avatar tbee commented on September 25, 2024

I've created a first implementation and it works. But because it's JFXtras and not JFXtras-labs I need to roll it out to all components (Calendar, LocalDate, LocalDateTime) with tests and samples. It will take some more work.

from jfxtras.

tbee avatar tbee commented on September 25, 2024

The latest 8.0-r2-SNAPSHOT should have the code now

from jfxtras.

millmanorama avatar millmanorama commented on September 25, 2024

thanks, for working on this so quickly. I will take look soon.

from jfxtras.

millmanorama avatar millmanorama commented on September 25, 2024

I see the callback, but I am a little confused about what to do with it. Could you post a short example?

from jfxtras.

tbee avatar tbee commented on September 25, 2024

Upon a range change, you can modify the disabled calendar/date property to hold the appropriate values for the active range.

Tom

On 2014-6-13 17:57, jonathan millman wrote:

I see the callback, but I am a little confused about what to do with it. Could you post a short example?


Reply to this email directly or view it on GitHub #7 (comment).

from jfxtras.

millmanorama avatar millmanorama commented on September 25, 2024

This does not seem like a viable way to achieve my goal of not allowing selection outside a range. If I have to add every possible disabled LocalDateTime to a list i will have to generate thousands and thousands of them, one for every possible time (at least to the minute...). It seems better to provide a validation callback and test potential LocalDateTimes as needed.

from jfxtras.

tbee avatar tbee commented on September 25, 2024

Hmmm, disabled date does not work on time level.

How do you see that? While dragging the slider you cannot skip values. So once a value is selected, it gets validated and if disapproved the old value is set?

Tom

On 2014-6-13 18:51, jonathan millman wrote:

This does not seem like a viable way to achieve my goal of not allowing selection outside a range. If I have to add every possible disabled LocalDateTime to a list i will have to generate thousands and thousands of them, one for every possible time (at least to the minute...). It seems better to provide a validation callback and test potential LocalDateTimes as needed.


Reply to this email directly or view it on GitHub #7 (comment).

from jfxtras.

millmanorama avatar millmanorama commented on September 25, 2024

yes. or in my use case, since validation is simply 'is it within valid range?', the end point of the range could be selected.

from jfxtras.

tbee avatar tbee commented on September 25, 2024

I'll give it some thought. I see some problems but maybe that is just me :-)

On 2014-6-13 19:18, jonathan millman wrote:

yes. or in my use case, since validation is simply 'is it within valid range?', the end point of the range could be selected.


Reply to this email directly or view it on GitHub #7 (comment).

from jfxtras.

millmanorama avatar millmanorama commented on September 25, 2024

well, you know much more about how these controls work, And I mostly just care about my use case ;)

Thanks for all your help.

PS. If it makes it any easier (it might make it harder!), What I REALLY want is to not even show the date/times out side the range, so for example if the range was march 2000 - jan 2001, the user would never even be able to show the date/times in feb 2000

from jfxtras.

tbee avatar tbee commented on September 25, 2024

Well, that all is not that hard to add, it seems, at least on day level. And sounds like a fair use case. The advantage of open source is that I can switch much quicker than the official controls ;-)

Tom

On 2014-6-13 19:40, jonathan millman wrote:

well, you know much more about how these controls work, And I mostly just care about my use case ;)

Thanks for all your help.

PS. If it makes it any easier (it might make it harder!), What I REALLY want is to not even show the date/times out side the range, so for example if the range was march 2000 - jan 2001, the user would never even be able to show the date/times in feb 2000


Reply to this email directly or view it on GitHub #7 (comment).

from jfxtras.

tbee avatar tbee commented on September 25, 2024

Ok. I've added a valueValidationCallback to the Calendar versions of the pickers. Not the textfield or the JSR-310 versions. Can you give them a test before I roll this out further (that is always a lot of repetitive work)?

from jfxtras.

tbee avatar tbee commented on September 25, 2024

No feedback in a long time. Closing.

from jfxtras.

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.