TtxtPetraDate specification and testing

From OpenPetra Wiki
Revision as of 14:47, 11 October 2012 by Pokorra (talk | contribs) (Created page with '= requirements = * allow entering the date by digits only, eg. 311212 becomes 31-dec-2012 * allow entering = for todays date * allow entering +3 for three days from today * if an…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

requirements

  • allow entering the date by digits only, eg. 311212 becomes 31-dec-2012
  • allow entering = for todays date
  • allow entering +3 for three days from today
  • if an invalid date is entered, show a message. do not delete the input
  • only throw a DateChanged event if there is a new valid date, or the date has been deleted

code

  • there is a NUnit test
  • there is a test application

events

DateChanged

  • used in csharp\ICT\Petra\Client\MFinance\Gui\Gift\UC_GiftBatches-generated.Designer.cs, calling UpdateBatchPeriod

problems

  • event TextChanged is only triggered on the screen, but not when the text property is changed???
  • enter 30: messagebox, invalid date. but enter some text, no message box
  • UK culture: can parse 20-MARCH-2012, but not 20-NOVEMBER-2012