Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

How do I make DatePicker look like a button OR Show Select Date Dialog using Xamarin Forms CustomRen

$
0
0

So I would like to have an "Add To Diary" button and allow the user to then select a date from a dialog to add an item to a diary. Now I can get aDate Picker Dialog using the DatePicker control, but this will not make sense to my user just seeing a random date. So I tried:

        <Grid Grid.Row="4">
          <DatePicker  HorizontalOptions="FillAndExpand"/>
          <Button Text="Add To Diary" HorizontalOptions="FillAndExpand"  Opacity="0.5" InputTransparent="True"/>
        </Grid>

To disguise my date as a button but still pop the Date Picker Dialog, But InputTransparent does not work on a Button (On Android) (Is this a bug?)

Then I looked at:

developer.xamarin.com/recipes/android/controls/datepicker/select_a_date/- Android

https://developer.xamarin.com/recipes/ios/standard_controls/actionsheet/actionsheet_date_picker/ - iOS

But these two Date Picker Dialog examples are for Native Platforms. Can I really have a Custom Renderer that pushes a page to my stack and appears as a ActionSheet or Dialog?


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>