Skip to content

Instantly share code, notes, and snippets.

@foxanna
Created October 10, 2018 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save foxanna/9b6052084d962ca15851cf1c5b54456c to your computer and use it in GitHub Desktop.
Save foxanna/9b6052084d962ca15851cf1c5b54456c to your computer and use it in GitHub Desktop.
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;
...
[assembly: ExportRenderer(typeof(ExtendedDatePicker), typeof(ExtendedDatePickerRenderer))]
...
public class ExtendedDatePickerRenderer : DatePickerRenderer
{
public ExtendedDatePickerRenderer(Context context) : base(context)
{
}
protected override void OnElementChanged(ElementChangedEventArgs<DatePicker> e)
{
base.OnElementChanged(e);
Control.CustomSelectionActionModeCallback = new CustomSelectionActionModeCallback();
Control.CustomInsertionActionModeCallback = new CustomInsertionActionModeCallback();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment