'Declaration Public Enum ClosestDayToReturn Inherits System.Enum
public enum ClosestDayToReturn : System.Enum
Member | Description |
---|---|
After | The closest item at or after the specified value. |
Before | The closest item at or before the specified value. |
BeforeOnOrAfter | The closest item will be returned. |
BeforeOrAfter | The closest item (not including the item) to the value will be returned. |
CurrentDay | The current item is checked. |
OnOrAfter | Any item from the current item and after is checked. |
OnOrBefore | Any item from the current item or before is checked. |
Imports Infragistics.Win Imports Infragistics.Win.UltraWinSchedule Imports System.IO Imports System.Globalization Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click ' Get the the first selectable date (i.e., visible and enabled) that ' falls on or after the current date Dim selectableDate As DateTime = DateTime.Today Me.ultraCalendarInfo1.GetClosestSelectableDate(DateTime.Today, ClosestDayToReturn.OnOrAfter, selectableDate) ' Display the first selectable date to the end user MessageBox.Show("The first selectable day that falls on or after the current date is " + selectableDate.ToLongDateString() + "." + vbCrLf, "GetClosestSelectableDate", MessageBoxButtons.OK) End Sub
using System.Diagnostics; using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; using System.IO; using System.Globalization; private void button1_Click(object sender, System.EventArgs e) { // Get the the first selectable date (i.e., visible and enabled) that // falls on or after the current date DateTime selectableDate = DateTime.Today; this.ultraCalendarInfo1.GetClosestSelectableDate( DateTime.Today, ClosestDayToReturn.OnOrAfter, ref selectableDate ); // Display the first selectable date to the end user MessageBox.Show( "The first selectable day that falls on or after the current date is " + selectableDate.ToLongDateString() + "." + "\n", "GetClosestSelectableDate", MessageBoxButtons.OK ); }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2