This is a migrated thread and some comments may be shown as answers.

Display Month Year RadDatePicker

1 Answer 148 Views
DatePicker for XAML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Robert
Top achievements
Rank 1
Robert asked on 26 Jun 2013, 02:20 PM
I am writing to determine how best to implement the RadDatePicker for Windows 8 to display initially only Month Year - rather than Month Day Year;

Below is the Xaml mark up code for the RadDatePicker, including the DisplayValueFormat="MMMM, yyyy" - this works as intended, and following the selection of a date, displays "May, 2013" (for example); 
<Input:RadDatePicker x:Name="rdpFiscalMonthName" Header="Fiscal Month" Grid.Row="0" Grid.Column="0" DisplayValueFormat="MMMM, yyyy" ItemLength="90" Value="{Binding ArriveDate}" ValueChanged="rdpFiscalMonthName_ValueChanged"/>
  
Value="{Binding ArriveDate}" is the binding code to the C# - shown below:
var booking = new Booking();     
booking.ArriveDate = DateTime.Now;

public class Booking
    {
        public DateTime ArriveDate
        {
            get;
            set;
        }    
    }

1 Answer, 1 is accepted

Sort by
0
Robert
Top achievements
Rank 1
answered on 26 Jun 2013, 02:48 PM
adding SelectorFormat="m,y" as an attribute to the RadDatePicker is the resolution; 
Tags
DatePicker for XAML
Asked by
Robert
Top achievements
Rank 1
Answers by
Robert
Top achievements
Rank 1
Share this question
or