Comments (16)
CalendarPicker has a disabledCalendars property. You can register a callback in the calendarRangeCallbackProperty and set the disabledCalendars accordingly.
from jfxtras.
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.
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.
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.
The latest 8.0-r2-SNAPSHOT should have the code now
from jfxtras.
thanks, for working on this so quickly. I will take look soon.
from jfxtras.
I see the callback, but I am a little confused about what to do with it. Could you post a short example?
from jfxtras.
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.
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.
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.
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.
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.
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.
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.
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.
No feedback in a long time. Closing.
from jfxtras.
Related Issues (20)
- Error setting calendar for CalendarPicker HOT 17
- Agenda hours HOT 1
- JFxtras UI bug when try to switch skin into day view and week view HOT 3
- JFXtras not building HOT 1
- Module trouble with VFXWindows-samples HOT 1
- Broken versioning in Maven Central HOT 1
- NullPointerException when parsing VCalendar HOT 1
- Microsoft Outlook use different time zone id's HOT 6
- DateTimePicker in Vbox with Hgrow not working HOT 3
- NullPointerException when opening advance edit or edit on already created event.
- Exception with HOT 7
- how can use gsls shader in javafx? HOT 1
- how to use JFxtras with Scenebuilder on Netbeans 8.2? HOT 1
- Maven jfxtras-test-support Test Scope HOT 10
- Minor - Broken link
- Release JFXtras built on JavaFX 17 HOT 1
- incorrect link HOT 2
- JMetro dark theme with localDateTimeTextField barely readable HOT 4
- Agenda with specific hour range HOT 3
- Agenda display appointment
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 jfxtras.