Base solution for your next web application
Open Closed

birthdate bsdatepicker luxon #11132


User avatar
0
neosadmin created

Prerequisites

  • What is your product version? 11
  • What is your product type (Angular or MVC)? angular
  • What is product framework type (.net framework or .net core)? .net core

Hello, I have a problem with the management of the field birth date of my entity. I need to store the date on sql without any time, avoiding conversion of timezome. Using the bsDateTime with the luxon date, generated by the RAD tools I have some problems with timezones. For example, i set 05/12/2020 and according to the timezone I receive server side 04/12/2020 or 05/12/2020.

Any suggestion?


5 Answer(s)
  • User Avatar
    0
    neosadmin created

    I made a test on demouicomponent:

    According with the timezome of the operating sistem, I have a different date from the enduser input and the date value received server side.

    thanks

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    You can use https://aspnetboilerplate.com/Pages/Documents/Timing#disable-datetime-normalization on the related DTO and Entity fields to ignore normalization.

  • User Avatar
    0
    neosadmin created

    I tryed with the following input object: public class DateInputDto { [Required] [DisableDateTimeNormalization] public DateTime? Date { get; set; } } but I have the same result:

    the client post '2022-06-15T10:00:00.000+00:00'

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Could you create an issue on https://github.com/aspnetzero/aspnet-zero-core/issues ? I will take a look at this problem as soon as possible.

  • User Avatar
    0
    neosadmin created

    https://github.com/aspnetzero/aspnet-zero-core/issues/4607