xdev-software / vaadin-date-range-picker Goto Github PK
View Code? Open in Web Editor NEWVaadin Flow DateRangePicker ๐ implementation
Home Page: https://vaadin.com/directory/component/daterangepicker-for-vaadin
License: Apache License 2.0
Vaadin Flow DateRangePicker ๐ implementation
Home Page: https://vaadin.com/directory/component/daterangepicker-for-vaadin
License: Apache License 2.0
Provide a live online demo
While working with the JAR I noticed that it has >3MB.
After further investigation I found out that the META-INF/VAADIN
folder is huge (unpacked 12MB!)
There are similar add-ons that ignore this complete folder and work fine:
https://github.com/syampillai/SOCharts/blob/4209566c3ea431cda30e1e305966b5defa6a1869/pom.xml#L234
Hey,
The DateRangePicker could implement the HasValue
interface. Some methods for it are already implemented. The get/setValue methods can apply to the current DateRangeModell.
Hey,
I was searching for a way to set the default DateRange. With the way, I was thinking, I ended up with getting the current model and setting the DateRange to it. Now I was digging through the code and saw the method which (I think) is meant to be used for this setModellForTodayAndByDateRange
. The first time I saw this method, it was curious to me. I would simply name the method 'setDateRange' and maybe overload it with a version to supply the LocalDate by yourself. The explanation should be done with some JavaDoc.
A faster accessor for the current DateRange would be also nice. So you can call it simply at the DateRangePicker to get the current value. In general, it may make sense to pass through the accessor methods of the model. It's just an idea, I am happy to discuss this.
There seems to be a problem with Vaadin 24:
When the datepicker is clicked the underlying dialog is instantly closed, which will result in not setting the date
The default implementation of clear
in HasValue uses the default getEmptyValue
, which is null
. I am not sure what should happen if clear
is called, but a NPE should never occur. I think it should jump back to the defaultModel
.
java.lang.NullPointerException: null
at software.xdev.vaadin.daterange_picker.ui.DateRangePicker.tryFixInvalidModel(DateRangePicker.java:355) ~[vaadin-date-range-picker-2.0.0.jar:2.0.0]
at software.xdev.vaadin.daterange_picker.ui.DateRangePicker.updateFromModel(DateRangePicker.java:333) ~[vaadin-date-range-picker-2.0.0.jar:2.0.0]
at software.xdev.vaadin.daterange_picker.ui.DateRangePicker.setValue(DateRangePicker.java:501) ~[vaadin-date-range-picker-2.0.0.jar:2.0.0]
at software.xdev.vaadin.daterange_picker.ui.DateRangePicker.setValue(DateRangePicker.java:63) ~[vaadin-date-range-picker-2.0.0.jar:2.0.0]
at com.vaadin.flow.component.HasValue.clear(HasValue.java:179) ~[flow-server-2.4.2.jar:2.4.2]
Related to #54
Clarifies that the value is used once initially.
Is this intended that the latest release is not published?
Maybe related: https://github.com/xdev-software/vaadin-date-range-picker/actions/runs/6107939550
Currently the Vaadin Datepicker is very limited.
For example it doesn't support a date format โ vaadin/flow-components#911
However there are some solutions for this problem:
GeneratedDatePicker
(and is now licensed under Apache 2)To make them work a supplier (with GeneratedDatePicker
) or two - for start
and end
- is required.
Firstly, thanks for the fixes and updates to the DateRangePicker. I really appreciate it ๐.
The DRP overlay closes if you are clicking out of the DatePicker overlay back into the DRP overlay or on another component. This does not happen if it is closed with a selection or close action.
Related to #48
Hey,
While working with the component I discovered some typos. I am not sure If there are more of them, but it should be checked:
Hi XDEV,
I have tested today your component. First of all, it's great!
But while developing I discovered some problems with translating the component:
initUI
of DateRangePickerOverlay, which is called on constructor invocation. So the change afterward doesn't have any effect.It should be applied like the translation for the DatePickers in the AttachEvent
.
I could create a pull request for this.
I am also from Germany, so we could communicate in german. Feel free to contact me.
Best regards,
Dario
Hey,
Currently, for the SimpleDateRange Quarter, it is not possible to select a start date which is after the current quarter. This can only be done through the end date. I think for usability it should be possible to select the quarter also over the start date.
I don't know if this is limited by the 'calcForFunc' which only uses one date and not both.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.