How can I force users to pick the first day of month and the last day of month? Please help (Infopath 2007) - InfoPath Dev
in

InfoPath Dev

How can I force users to pick the first day of month and the last day of month? Please help (Infopath 2007)

Last post 08-17-2010 12:02 PM by bahrom7893. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 08-17-2010 12:02 PM

    How can I force users to pick the first day of month and the last day of month? Please help (Infopath 2007)

    I have two datepickers in my database form template. When a user runs the query, he/she sees 3 columns with values, then 2 datepickers and then another column with values. Everything is working fine, but I'm having trouble with data validation in date pickers. The xml date is in this format: 2010-08-01T00:00:00, and I used a rule: Start_Date doesn't match pattern with 2[any three digits]-[any two digits]-01[any amount of any characters], so my sample shows 2XXX-XX-01XXXXXX,etc. However, when I preview the template and click on "Run Query", the date 2010-08-01T00:00:00 (from a sql database) has a red outline and I get a data validation error. When I pick the same date on the same cell on the form from a date picker, I still have 2010-08-01T00:00:00 but without a validation error. So every time I run a query, I have to click on the first day of some month using the datepicker, otherwise I get a validation error, and I am going to have several thousand of these cells later on.

    So for the first date picker users have to be able to enter:

    08/01/10

    08/01/2010

    8/1/10

    8/1/2010

    08/1/10

    08/1/2010

    8/01/10

    8/01/2010

    or any other popular "month date year" format and also pick a date from the date picker and get a validation error only if they pick/enter anything except the first day of any month of any year. I'm only interested in the first day.

    The second date picker should work the same way, only instead of the first day of month I need them to enter the last day of any month of any year.

    Thank you,

    Bahrom

Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.