Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics SL forum
Unanswered

DSLDate don't work correctly in New .Net application

Posted on by 5

Hi All,

I created a new .Net application used in SL and I'm using the DSLDate control connected to a SmallDateTime field in the database.

I managed to assign the DateTime.Now value to my "ReceivedDate" field using Value when opening the screen.

But when I leave this field (lost focus) without making any changes and my date ends with an 8 or a 9 (Ex: July 8 or July 19), the control change it to the MinDate or MaxDate value.

If the date ends with something else, it stays with the assigned value at the opening.

As soon as I select a new date in the calendar popup, this error stop to occur.

More, in any case, in the immediate window, i get this error each time: 

Exception setting property Text.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentOutOfRangeException: Year, Month, and Day parameters describe an un-representable DateTime.
at System.DateTime.DateToTicks(Int32 year, Int32 month, Int32 day)
at Microsoft.Dynamics.SL.Controls.DSLDate.set_Text(String value)
--- End of inner exception stack trace ---

Best Regards,

Martine

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,995 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,610 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans