If you don't want to copy the page from Codeplex, you can extend the page and override the GetSelectorsOrderedByCulturePattern method to change the day selector's visibility. In the example below I've fixed it to month then year, which you may not want in your version. Also I'm accessing controls by name, so take care with future updates to WindowsPhone Toolkit.
<toolkit:DatePickerPage
x:Class="MyApp.MonthYearPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
mc:Ignorable="d"
shell:SystemTray.IsVisible="True">
</toolkit:DatePickerPage>
And
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using Microsoft.Phone.Controls.Primitives;
using System.Diagnostics;
using System.Windows.Media;
namespace MyApp
{
public partial class MonthYearPage : DatePickerPage
{
public MonthYearPage()
{
InitializeComponent();
}
protected override IEnumerable<LoopingSelector> GetSelectorsOrderedByCulturePattern()
{
var PrimarySelector = ((Grid)Content).FindName("PrimarySelector") as LoopingSelector;
var SecondarySelector = ((Grid)Content).FindName("SecondarySelector") as LoopingSelector;
var TertiarySelector = ((Grid)Content).FindName("TretiarySelector") as LoopingSelector;
var selectors = GetSelectorsOrderedByCulturePattern(
"DMY",
new char[] { 'Y', 'M', 'D' },
new LoopingSelector[] { PrimarySelector, SecondarySelector, TertiarySelector });
// Passing "DMY" in on the previous line makes sure the day selector
// is the first one in the enumeration. You may want to change the order
// of 'M' and 'Y' in that string for your needs or depending on region.
selectors.First<LoopingSelector>().Visibility = Visibility.Collapsed;
return selectors;
}
}
}