Maui RadDatePicker stack overflow

1 Answer 98 Views
DatePicker
n/a
Top achievements
Rank 1
n/a asked on 02 Nov 2023, 01:38 PM

Hi, 

I am adding a RadDatePicker  programmatically to my MAUI app.  It is being displayed on the page but when I click on it I get System.StackOverflowException: 'The requested operation caused a stack overflow.'  Am I missing something?

 private readonly RadDatePicker _datePicker;
 _datePicker = new RadDatePicker();;

var grid = new Grid
{
    { new StackLayout() { Children = { _datePicker }, Margin = 0, Orientation = StackOrientation.Horizontal } } }, 0, 0 }
};


1 Answer, 1 is accepted

Sort by
0
Didi
Telerik team
answered on 02 Nov 2023, 03:09 PM

Hi Boyd,

I tried the provided code but it is not runnable.

I created a sample to test the case and here is the result:


This is the code:

public partial class MainPage : ContentPage
{
    int count = 0;
    private readonly RadDatePicker _datePicker;

    public MainPage()
    {
        InitializeComponent();
        _datePicker = new RadDatePicker();

        var grid = new Grid
        {
            {
                new StackLayout()
                {
                    Children = { _datePicker },
                    Margin = 0,
                    Orientation = StackOrientation.Horizontal
                }
            }
        };

        this.Content = grid;
     }
}

 

 

Tags
DatePicker
Asked by
n/a
Top achievements
Rank 1
Answers by
Didi
Telerik team
Share this question
or