The selection of the calendar period from the date to the date would ultimately be two dates, the beginning and end of the text box.



  • I just started studying C# and I don't get it, but I want to learn in practice. Maybe someone who's got a reference to a ready-made option to study it or help create it. I would also appreciate it if you could provide the best study material. Maybe there's a library that's already done with this decision?

    I found a solution as simple as that.

      text1.Text = ( DateReport.SelectedDates.Min () ).ToString ();
      text2.Text = ( DateReport.SelectedDates.Max () ).ToString ();
    


  • DateTime thisDay = DateTime.Today;
    DateTime date1 = new DateTime(2008, 6, 1, 7, 47, 0);
    textBox1.text = thisDay.ToString("d");
    textBox2.text = date1.ToString("d");
    

    I recommend that the documentation be read. https://docs.microsoft.com/ru-ru/dotnet/api/system.datetime?view=net-5.0 and look carefully at the properties, fields and methods.



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2