MajMcCloud / TelegramBotFramework

This is a context based application framework for the C# TelegramBot library.
https://www.t.me/tgbotbase
MIT License
149 stars 43 forks source link

Exception when use Calendar/Month picker #39

Closed bretbas closed 1 year ago

bretbas commented 1 year ago

I have a simple StartForm with method OnInit - handler of Init event. In OnInit method i create calendar/month picker:

    private async Task OnInit(object sender, InitEventArgs ev)
    {
        MonthPicker monthPicker = new MonthPicker();
        AddControl(monthPicker);
    }

Also in StartForm i have overriden Render method with empty body.

When i started the bot, i got exception in Render method when i tried move to next/previous year: photo_2023-01-20_18-22-01

MajMcCloud commented 1 year ago

Please check the example project as below: https://github.com/MajMcCloud/TelegramBotFramework/blob/master/TelegramBotBase.Test/Tests/Controls/MonthPickerForm.cs

You have forgot to set a title.