Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

CalendarEvent.getStartDate() ignores custom start date field name set on Calendar

$
0
0
Follows an excerpt from CalendarEvent.java (SmartGWT 4.1p nightly build, SmartClient Version: v9.1p_2014-06-22/LGPL Development Only (built 2014-06-22))
It says that the name of the start attribute of the calendar event can be customized n the Calendar instance, so as a user I'd expect that CalendarEvent.getStartDate() eventually returns the value of the custom attribute, but it's not the case, as the attribute name is hardcoded there.

Code:

    /**
    * Date object which represents the start date of a {@link com.smartgwt.client.widgets.calendar.CalendarEvent}. The name of
    * this field within the CalendarEvent can be changed via {@link
    * com.smartgwt.client.widgets.calendar.Calendar#getStartDateField startDateField}
    *
    * @return Date
    */
    public Date getStartDate()  {
        return getAttributeAsDate("startDate");
    }

In fact debugging some client code I can see how the calendarEvent has the custom attribute set, but calling getStartDate() returns null.

Viewing all articles
Browse latest Browse all 4756

Trending Articles