We started using the TimeLine but we are unable to get any reliable selection dates from the timeline or any calendar events. We need to build our own EventDialog screen and therefore need to populate it with the selected start and end date.
We have tried numerous date fields, as per below:
The only date we receive is from timeline.getDateFromPoint(), but this value only represents the Date value of when you released your mouse click (so basically the end date). So making a selection over a few days is not possible as we have no way of telling what the user selected. We only get null values for both start and end dates.
We also find that as soon as you try and make a selection by holding down and selecting across (L-R), that the start date hilite on the timeline starts at the very first date built (and not chosen start date) on the timeline to your released (end date) date, but still no values are provided.
We have commented out the setEventDialogCustomizer to see what the timeline default displays and we are still not able to get a reliable selection, the results varies and is not consistent enough to use. We also tried using the showcase and the results are pretty much the same.
On the Calendar component it all seems to work fine and addEventAddHandler is providing all the information we need, but we need the timeline to produce the desired dates.
SmartClient Version: v10.0p_2015-05-12/PowerEdition Deployment (built 2015-05-12)
Browsers
FireFox - 26.0
Chrome - Version 42.0.2311.135 (64-bit)
Javascript - Developer Console (Nothing related to the problem)
We have tried numerous date fields, as per below:
Code:
TimeLine timeline = new TimeLine();
timeline.setLaneFields(new ListGridField[]{ IDBANQUETINGROOM, new ListGridField("Room", constants.Room(), 150)});
timeline.setLaneNameField("IDBANQUETINGROOM");
timeline.setDataSource(dsEvent);
timeline.setDescriptionField("ReservationNameNumber");
timeline.setStartDateField("FromDT");
timeline.setEndDateField("ToDT");
timeline.setNameField("ReservationType");
timeline.setEventStyleNameField("ReservationStatusStyle");
timeline.setEventDialogCustomizer(new EventDialogCustomizer() {
@Override
public boolean showEventDialog(CalendarEvent calendarEvent, Boolean isNewEvent) {
if (isNewEvent){
Date d1 = calendarEvent.getAttributeAsDate("FromDT");
Date d2 = calendarEvent.getAttributeAsDate("startDate");
Date d3 = calendarEvent.getStartDate();
Date d4 = timeline.getChosenDate();
Date d5 = timeline.getDateFromPoint();
return false;
} else return false;
}
});We also find that as soon as you try and make a selection by holding down and selecting across (L-R), that the start date hilite on the timeline starts at the very first date built (and not chosen start date) on the timeline to your released (end date) date, but still no values are provided.
We have commented out the setEventDialogCustomizer to see what the timeline default displays and we are still not able to get a reliable selection, the results varies and is not consistent enough to use. We also tried using the showcase and the results are pretty much the same.
On the Calendar component it all seems to work fine and addEventAddHandler is providing all the information we need, but we need the timeline to produce the desired dates.
SmartClient Version: v10.0p_2015-05-12/PowerEdition Deployment (built 2015-05-12)
Browsers
FireFox - 26.0
Chrome - Version 42.0.2311.135 (64-bit)
Javascript - Developer Console (Nothing related to the problem)
Code:
12:39:28.459:XRP9:WARN:SelectItem:isc_CrudLookupItem_28[type]:BAD VALUES: {newValue: "",
filterLocally: undef,
targetField: "IDBANQUETINGTYPE",
fetchingMissingValues: Obj}
12:39:28.490:XRP9:WARN:SelectItem:isc_CrudBanquetingRoomConfigurationItem_7[roomConfig]:BAD VALUES: {newValue: "",
filterLocally: undef,
targetField: "IDBANQUETINGROOMCONFIGURATION",
fetchingMissingValues: Obj}
12:39:28.523:XRP9:WARN:SelectItem:isc_CrudLookupItem_29[packages]:BAD VALUES: {newValue: "",
filterLocally: undef,
targetField: "IDBANQUETINGPACKAGE",
fetchingMissingValues: Obj}
12:39:28.568:XRP9:WARN:SelectItem:isc_CrudLookupItem_31[rate]:BAD VALUES: {newValue: "",
filterLocally: undef,
targetField: "IDBANQUETINGRATECODE",
fetchingMissingValues: Obj}
12:39:28.813:XRP0:WARN:SelectItem:isc_CrudLookupItem_28[type]:BAD VALUES: {newValue: "",
filterLocally: undef,
targetField: "IDBANQUETINGTYPE",
fetchingMissingValues: Obj}
12:39:28.820:XRP1:WARN:SelectItem:isc_CrudBanquetingRoomConfigurationItem_7[roomConfig]:BAD VALUES: {newValue: "",
filterLocally: undef,
targetField: "IDBANQUETINGROOMCONFIGURATION",
fetchingMissingValues: Obj}
12:39:28.828:XRP3:WARN:SelectItem:isc_CrudLookupItem_29[packages]:BAD VALUES: {newValue: "",
filterLocally: undef,
targetField: "IDBANQUETINGPACKAGE",
fetchingMissingValues: Obj}
12:39:28.835:XRP4:WARN:SelectItem:isc_CrudLookupItem_31[rate]:BAD VALUES: {newValue: "",
filterLocally: undef,
targetField: "IDBANQUETINGRATECODE",
fetchingMissingValues: Obj}