blackbluegl / calendar-component Goto Github PK
View Code? Open in Web Editor NEWinitial Vaadin8 calendar-component
License: Apache License 2.0
initial Vaadin8 calendar-component
License: Apache License 2.0
Make resizeable, moveable, clickable available on items.
I get a java.io.NotSerializableException: java.time.format.DateTimeFormatter when the session gets serialized.
The issue does not seem to be adressed yet.
Label in calendar ignores time zone. This is cause by no zoneId in formatter.
Test case:
LocalDateTime = 2019-11-08 09:16:00
Time zone = Europe/Bratislava (UTC+2)
Calendar timezone = Europe/London (UTC+1)
Label should be "8:16 AM", not "9:16 AM"
Testcase example:
BasicItem basicItem = new BasicItem();
basicItem.setDescription("Test 1");
basicItem.setStart(ZonedDateTime.of(LocalDateTime.now(), ZoneId.of("Europe/Bratislava")));
basicItem.setEnd(ZonedDateTime.of(LocalDateTime.now().plusHours(1), ZoneId.of("Europe/Bratislava")));
BasicItemProvider basicItemBasicItemProvider = new BasicItemProvider<>();
basicItemBasicItemProvider.addItem(basicItem);
Calendar calendar = new Calendar<>(basicItemBasicItemProvider);
calendar.setWidth(100f, Unit.PERCENTAGE);
calendar.setHeight(100f, Unit.PERCENTAGE);
calendar.setZoneId(ZoneId.of("Europe/London"));
calendar.setFirstDayOfWeek(DayOfWeek.MONDAY);
but it would be great to have the possibility to restrict the shown hours in the "single-day-view", because often you don't need the early morning hours in a business application and you don't want to waste the space for these ...
Maybe this is already possible right now and I couldn't find out how.
I know that there's the possibility to have a scrollbar, but this is really annoying for the user if he HAS to scroll every time he / she uses the widget. I think this would be a bad UX practice.
Any feedback would be appreciated!
I attached a screenshot to clarify what I mean:
1. height is fix, not matter set sizeFull or a larger height. <- this was my fault, the old style fixed the size...
2. rows are only rendered on today
<-- another style error
3. header column local is rendering dayname correctly but date format is not corresponding to locals one. See previous screenshot
4. style for calendar items does not work it does
Probably, it could be useful to add possibility for user to set Navigation Buttons caption.
Current hour don't use zoneId. I set the user's zoneId but the component get system default.
`
calendar = new Calendar<>(eventProvider);
calendar.setZoneId(defaultZoneId);
calendar.withDay(ZonedDateTime.now(defaultZoneId));
calendar.withDayInMonth(ZonedDateTime.now(defaultZoneId));
calendar.addStyleName("meetings");
calendar.setWidth(100.0f, Unit.PERCENTAGE);
calendar.setHeight(100.0f, Unit.PERCENTAGE);
calendar.setResponsive(true);
calendar.setItemCaptionAsHtml(true);
calendar.setContentMode(ContentMode.HTML);
calendar.withVisibleDays(1, 5);
calendar.withVisibleHours(8, 18);
calendar.setLocale(CurrentUser.get().getLocale());
calendar.setTimeFormat(TimeFormat.Format24H);
calendar.setStartDate(ZonedDateTime.of(2017, 9, 10, 0,0,0, 0, defaultZoneId));
calendar.setEndDate(ZonedDateTime.of(2017, 9, 16, 0,0,0, 0, defaultZoneId));`
In Calendar Component for Vaadin 8 in Calendar Add on, Is there any upcoming feature to navigate Next Month Or Last Month and by selecting date of September month then Month label changes accordingly?
sir, i want to use this calendar addon in my legacy project, vaadin version is 7.7.7, i try the branch V1.1, but it's seem not successfully , it exist any version addon match my request? thanks.
You have issue with polling method.
in Method beforeClientResponse(boolean initial) you always call setupCalendarItems(); , but with polling it always sets items when poolled.
It is interesting that it only happens when you are in Week view and scroll down a bit.
Wating for a fix asap!
Kristaps.
Hi,
at the moment the predefined timeslots are set to 30 minutes.
Would it be possible to change it to 15 minutes? Maybe configurable?
Thanks and regards,
Marcel
items are moveable still even with isMoveable()=false, again only in monthly View.
widget property missing
Scroll of calendar always scroll to top when new event is added, resized or moved..
We need blocked time slots where item placement is not allowed. Visual greyed out.
It is possible in the Calendar of Vaadin 7. Please, return this feature.
IE Problem: After scroll down, and click on date cell, It is auto scroll up and fire range select event
it is from 23:30 to end date of yesterday of clicked date.
Hi! As Iām pretty new to the calendar addon, Iād appreciate your help.
I want to switch off day and week calendar view, leaving only the monhly view. Do you guys happen to know how to do that? So far I managed to show monthly view as the defaul one.
I want to redirect to custom page when the user clicks a day in calendar. Also, any help appreciated!
Thanks in advance!
In month mode, I set the style name for each calendar item per my color preference. However, when switching to the week or day mode, the style name is reset to default. Is there a way to retain or set the style name when the week or day mode is activated?
I'm wondering why the calendar API was changed to use ZoneDateTime instead of LocalDateTime? I was thinking it would be better to have the public API all be LocalDateTime so applications don't have to constantly convert back and forth. Inside the Calendar's private methods ZoneDateTime would be figured out using the ZoneID set on the calendar.
Also I don't see ZoneDateTime used on the DateField Vaadin component. So it might also be more consistent as well.
How to keep the Monthly Mode Active in Beginning and When Click A Date, which trigger DateClickEvent and Not to Go Into Specific Date
When calendar display with scroll, and when i select a range or drag event to disappear area of calendar, scroll is don't move.
Could you fix this?
In BasicBackwardHandler class there is a bug in finding previous day in daily mode (Same bug exists in BasicForwardHandler). If not showing weekends on calendar (getFirstVisibleDayOfWeek => 1, getLastVisibleDayOfWeek => 5), when you press back button on Monday (i expect to see previous friday) there is a bug at line :
dayOfWeek = start.get(ChronoField.DAY_OF_WEEK);
It has to be:
dayOfWeek = newDate.get(ChronoField.DAY_OF_WEEK);
Hello,
First, thank you for working on a Calendar add-on for Vaadin. The framework most certainly needs a calendar.
I cannot figure out how to change the order of the days in the Calendar. The default order is:
Mon, Tue, Wed, Thu, Fri, Sat, Sun
but this does not match the typical US calendar. I want the days to be in the following order:
Sun, Mon, Tue, Wed, Thu, Fri, Sat
Code example:
calendar = new Calendar<>(eventProvider);
calendar.setLocale(Locale.ENGLISH);
calendar.markAsDirty();
Thank you for your time!
When the calendar displays multiple full-day events in week modus that overlap, in some cases the UI incorrectly aligns the event bars when a certain events stops. This problem however doesn't occur when using the calendar in month mode.
2.0.1
I noticed that the thin beam for all-day-appointments in your calendar appears not only, when an appointment takes from 00:00 to 00:00 of the next day, but also if an appointment is longer than 24 hours.
For example:
If an appointment starts today at 13:00 oclock and ends tomorrow at 14:00 oclock, the cal recognizes this as a all-day-appointment for today AND tomorrow and shows its all-day-beam for these two days.
But its not a all-day-event for even one of these two days.
If I set the end time of this appointment back to 12:30 the event shows in cal like a normal event.
The first week of the year calculation can differ per country or region. Therefore, it will be nice to have the possibility to configure it independently from any Windows or browser settings, so that the user can set it.
The feature will depend on the 'minimum number of days in the first week' and 'first day of week' configurations.
If the 'minimum number of days in the first week' or 'the first day of the week' values are null, the feature uses the 'locale' value by default.
While testing the addon on Vaadin 8, I came across a runtime error. The strange thing is it only happens when you jump from March to April in month mode. You can reproduce the error by overriding the BasicForwardHandler forward(ForwardEvent event) method.
// Forward handler
accountCalendar.setHandler(new BasicForwardHandler() {
/**
*
*/
private static final long serialVersionUID = 1L;
/*
* (non-Javadoc)
*
* @see
* org.vaadin.addon.calendar.handler.BasicForwardHandler#forward(org.vaadin.
* addon.calendar.ui.CalendarComponentEvents.ForwardEvent)
*/
@Override
public void forward(ForwardEvent event) {
ZonedDateTime bstart = event.getComponent().getStartDate();
ZonedDateTime bend = event.getComponent().getEndDate();
long bduration = Duration.between(bstart, bend).toDays();
System.out.println("Before super start " + bstart);
System.out.println("Before super end " + bend);
System.out.println("Before super duration " + bduration);
// Let the super handle the rest
super.forward(event);
ZonedDateTime astart = event.getComponent().getStartDate();
ZonedDateTime aend = event.getComponent().getEndDate();
long aduration = Duration.between(bstart, bend).toDays();
System.out.println("After super start " + astart);
System.out.println("After super end " + aend);
System.out.println("After super duration " + aduration);
}
});
Stacktrace
java.lang.RuntimeException: Daterange is too big (max 60) = 61
at org.vaadin.addon.calendar.Calendar.setupDaysAndActions(Calendar.java:595)
at org.vaadin.addon.calendar.Calendar.beforeClientResponse(Calendar.java:323)
at com.vaadin.server.communication.UidlWriter.write(UidlWriter.java:126)
at com.vaadin.server.communication.AtmospherePushConnection.push(AtmospherePushConnection.java:168)
at com.vaadin.server.communication.PushHandler.lambda$new$1(PushHandler.java:149)
at com.vaadin.server.communication.PushHandler.callWithUi(PushHandler.java:248)
at com.vaadin.server.communication.PushHandler.onMessage(PushHandler.java:534)
at com.vaadin.server.communication.PushAtmosphereHandler.onMessage(PushAtmosphereHandler.java:87)
at com.vaadin.server.communication.PushAtmosphereHandler.onRequest(PushAtmosphereHandler.java:77)
at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:225)
at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:114)
at org.atmosphere.container.Servlet30CometSupport.service(Servlet30CometSupport.java:67)
at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:2297)
at org.atmosphere.websocket.DefaultWebSocketProcessor.dispatch(DefaultWebSocketProcessor.java:594)
at org.atmosphere.websocket.DefaultWebSocketProcessor$3.run(DefaultWebSocketProcessor.java:345)
at org.atmosphere.util.VoidExecutorService.execute(VoidExecutorService.java:101)
at org.atmosphere.websocket.DefaultWebSocketProcessor.dispatch(DefaultWebSocketProcessor.java:340)
at org.atmosphere.websocket.DefaultWebSocketProcessor.invokeWebSocketProtocol(DefaultWebSocketProcessor.java:448)
at org.atmosphere.container.JSR356Endpoint$3.onMessage(JSR356Endpoint.java:272)
at org.atmosphere.container.JSR356Endpoint$3.onMessage(JSR356Endpoint.java:269)
at org.apache.tomcat.websocket.WsFrameBase.sendMessageText(WsFrameBase.java:395)
at org.apache.tomcat.websocket.server.WsFrameServer.sendMessageText(WsFrameServer.java:119)
at org.apache.tomcat.websocket.WsFrameBase.processDataText(WsFrameBase.java:495)
at org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:294)
at org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:133)
at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:82)
at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:171)
at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:151)
at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:148)
at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:54)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
It would be very useful to have a way to set the row height in daily/weekly view
Migrate from java.util.Date to new DateTime-API
Later appointments are displayed before earlier appointment in month view. The error always seems to occur when an entry has more than a "30 minutes" timeslot.
Steps to reproduce:
Hello!
Is it possible to switch view mode (month, week, day) from server side?
(e. g. setMode(Mode.WEEK))
When calendar.SetHeight is 100% it gives a bigger height than it should and the last row is usually cut off.
It is more apparent with bigger sizes.
To be fair, it is the same in Vaadin 7 and in Vaadin 8 compatibility packages.
See also open issue vaadin/framework#8333
Apparently only in monthly View.
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.