CalendarEdit


Display a calendar with a date highlighted, allow the user to select another date.



XAML


∇  xaml←CalendarEditXAML
⍝ XAML for the CalendarEdit example
 xaml←⊂'<Window'
 xaml,←⊂'    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"'
 xaml,←⊂'    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"'
 xaml,←⊂'    xmlns:sftools="clr-namespace:Syncfusion.Windows.Shared;assembly=SyncFusion.Shared.WPF"'
 xaml,←⊂'    SizeToContent="WidthandHeight" >'
 xaml,←⊂'    <StackPanel>'
 xaml,←⊂'        <sftools:CalendarEdit Name="calendar">'
 xaml,←⊂'        </sftools:CalendarEdit>'
 xaml,←⊂'    </StackPanel>'
 xaml,←⊂'</Window>'


Code


∇  z←CalendarEdit w;⎕IO;⎕ML;xaml;⎕USING
⍝ Simple CalendarEdit example
 ⎕IO ⎕ML←0 3
 xaml←CalendarEditXAML
 #.window←#.UTIL.WPF.LoadXaml xaml(⊂'SyncTools')
 window_calendar←#.window.FindName⊂'calendar'
 window_calendar.Date←⎕NEW System.DateTime w
 {}#.window.ShowDialog
 z←window_calendar.Date.(Year Month Day)


Something of a puzzle here - since Microsoft offers a seemingly adequate Calendar class one wonders why there's also one in the Syncfusion libraries.

The 'SyncTools' argument to #.UTIL.LoadXAML has the effect of adding 'Syncfusion.Windows.Shared,Syncfusion/4.5/Syncfusion.Shared.WPF.dll' to the ⎕USING list of LoadXAML

Operation


       #.CalendarEdit.CalendarEdit 3↑⎕ts
2014 7 12

Unresolved Issues