AppointmentManager.ShowTimeFrameAsync | showTimeFrameAsync method

Applies to Windows and Windows Phone

Shows the Appointments provider app's primary UI. This typically displays a time frame from an appointments calendar.


Windows.ApplicationModel.Appointments.AppointmentManager.showTimeFrameAsync(timeToShow, duration).done( /* Your success and error handlers */ );



Type: Date [JavaScript] | System.DateTimeOffset [.NET] | Windows::Foundation::DateTime [C++]

A date and time object that specifies the beginning of the time frame that the Appointments provider app should display.


Type: Number [JavaScript] | System.TimeSpan [.NET] | Windows::Foundation::TimeSpan [C++]

A timespan that hints to the Appointments provider app how long the time frame shown should be.

Return value

Type: IAsyncAction

When this method returns, it does not return a result. On completion, the AsyncActionCompletedHandler specified by get_Completed / Completed is invoked.


This method uses parameter values representing date-time and timespan that are represented differently depending on which language you are programming with.

  • In JavaScript, set the timeToShow value with a Date object. Set the duration value with a TimeSpan representing a time span in 100-nanosecond units.
  • In Visual C++ component extensions (C++/CX), set the timeToShow value with a DateTime structure. Set the duration value with a TimeSpan representing a time span in 100-nanosecond units.
  • In C# or Microsoft Visual Basic, use a System.DateTimeOffset value for timeToShow, and a System.TimeSpan value for duration. You can use utility APIs of these structures to declare the values.

For info about how to manage appointments, see Quickstart: Managing appointments (XAML) and Quickstart: Managing appointments (HTML).


Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]


Windows::ApplicationModel::Appointments [C++]



See also

Appointments API sample



© 2014 Microsoft