getDateTimePart method

  1. @override
int getDateTimePart(
  1. PartFormat format
)
override

Implementation

@override
int getDateTimePart(PartFormat format) {
  CalendarDateTime date = _getSelectedDate();
  switch (format) {
    case PartFormat.YEAR:
      return date.year;
    case PartFormat.MONTH:
      return date.month;
    case PartFormat.DAY:
      return date.day;
  }
}