StudentUniverse angular date range picker

Raw month picker picker(su-datepicker-month-default)

  • date is required and is used to track which month is displayed.
  • clickCallback will be called with the date that was clicked.
  • dateDisabled callback will be called to determine if date is enabled.
  • customClass callback will be called to set custom styles.
  • cheapMousernterCallback will be called when a date is hovered. Callback must trigger $digest manually for performance reasons.

If you need further customizations you can use su-datepicker-month directive.


Default datepicker encompasses the raw month picker logic(su-datepicker-default)

  • The date will not change by changing month.
  • Date change is expected to be one way using the datepicker.
  • Using disable-past attribute will disable dates less than today.
  • Custom date disabled logic can be used by supplying a is-date-disabled callback.
  • Custom date click callback can be used by supplying a select-date callback.
  • Custom mouseenter logic can be used by supplying cheap-mouseenter-callback.
  • Custom date class logic can be used by supplying custom-class callback.
  • Custom header text can be set by supplying header callback.

Custom template can be used by adding template-url attribute.


Default date range picker encompasses the raw month picker logic(su-datepicker-range-default)

  • The date will not change by changing month.
  • Date change is expected to be one way using the datepicker.
  • Using disable-past attribute will disable dates less than today.
  • Custom date disabled logic can be used by supplying a is-date-disabled callback.
  • Custom date click callback can be used by supplying a select-date callback.
  • Custom mouseenter logic can be used by supplying cheap-mouseenter-callback.
  • Custom date class logic can be used by supplying custom-class callback.
  • Custom header text can be set by supplying header callback.

Example popup datepicker

Logic for opening and closing a datepicker popup is business specific. It's fairly easy to wrap a datepicker in a popup as the following example shows. The popup opens when the date field gets focus either by tabbing or clicking. If either the destination or submit get focus, or there's a click otside the datepicker the popup will close.