Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
95
DropDownCalendar - as column, strange year behaviour (right to left)
posted

Hi,

 a date column in a grid acts strange.

I wish to enter 01-01-1998 

 When entering 01-01-1 the fields says: 01-01-2001 and places the cursor at the end of the year.

 The year is not enteres left to right : 1998 - but automatically expect "2000" year

 

We have another date column in another grid on the same form - and that behaves as expected.

It does not look like there is any difference in the two grids/columns - but the act differently.

 

best regards

Michael Vad

Parents
  • 469350
    Verified Answer
    Offline posted

    Hi Michael,

    Are you saying that the 2001 appears immediately when you type the number 1? Or that you are typing the last "1" and then tabbing or clicking out of the cell and the date is interpreted at that point? 

    It seems to me that if you typed "01-01-1" and leave the cell, then the control has no choice but to interpret this as the year 2001. But if you have not left the cell and are still typing, then it should not be altering what you type. Perhaps something in the code is committing the value of the cell on every keystroke by calling Update on the Row or UpdateData on the grid. I would check to see if your code is handling the CellChange event of the grid and doing something in there that might be causing the value to be comitted prematurely. 

     

Reply Children
No Data