Validating Date Picker with submit button - InfoPath Dev
in

InfoPath Dev

Validating Date Picker with submit button

Last post 06-10-2013 08:24 AM by jwilliams. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 06-04-2013 10:00 AM

    Validating Date Picker with submit button

    I have a button with a condition that references the Date Picker field "Date picker" ->matches pattern -> custom pattern -> (\d{1,2})/(\d{1,2})/(\d{4}) I want the button to disappear if the string entered is matched with the custom pattern. Then I have another button that I want to appear if it does match the custom pattern. I have tried to change the date picker box to string and date formats and both do not work. Irrelevant, but why does InfoPath not have built in date patterns? Any help appreciated, I have no idea why it is not working.
  • 06-04-2013 11:26 PM In reply to

    Re: Validating Date Picker with submit button

    I think you'll have to have your buttons in 2 sections and each section has a rule on it to hide when it condition is not met. InfoPath is just built the way it is built. That does allow you to be creative in your solutions.

    InfoPath is used in SharePoint, you'd think at least the two teams would have talked to each other, but they didn't. Same with SharePoint and the Outlook teams.

  • 06-05-2013 06:22 AM In reply to

    Re: Validating Date Picker with submit button

    Thanks for the response. Not exactly sure what you mean here. I also have multiple text boxes on the form and have the respective button hide or appear when they are all filled in. If I take the date validation part out, the buttons do what they are supposed to do. It is just when I try and add the date validation that the buttons don't behave.
  • 06-06-2013 06:36 AM In reply to

    Re: Validating Date Picker with submit button

    Does anyone else have any thoughts on this problem? I still can't figure it out.
  • 06-06-2013 07:14 AM In reply to

    Re: Validating Date Picker with submit button

    The XML date format is:

    yyyy-MM-dd

    So, that is what your date picker is storing. You can change the format on the field that displays the date, if the field is a date data type. The data will be stored as 2013-01-12, but you can set the control to display 1/12/2013 - does that make sense? You can either look at a saved XML file in a text editor to see this, or add a calc'd value bound to the field and formatted to show the XML value to help you see what is going on.

    Separating data from presentation is something InfoPath is very good at, but it can make things like this confusing.

    Hilary Stoupa

  • 06-07-2013 06:54 AM In reply to

    Re: Validating Date Picker with submit button

    I looked at the date formatting and it was already set to 1/12/2013. My options for date format is non (display xml value) which is not what it is set to. and display the date like this: and it has already been set to 3/14/2001 format. Thanks for the response. any other suggestions?
  • 06-10-2013 07:42 AM In reply to

    Re: Validating Date Picker with submit button

    But the thing is - your custom pattern is not going to be comparing to the way the date is formatted, but to the actual value of the date field, which will be yyyy-MM-dd.

    Hilary Stoupa

  • 06-10-2013 07:49 AM In reply to

    Re: Validating Date Picker with submit button

    Ok, I tried both custom patterns, \d{4}/\d{1,2}/\d{1,2} and \d{1,2}/\d{1,2}/\d{4}. They both are not working. Is that what you were suggesting I change, or? I really appreciate your help thus far.
  • 06-10-2013 08:08 AM In reply to

    Re: Validating Date Picker with submit button

     The date separator is a "-", not a "/". Yes, that is what I'm suggesting you change is the date pattern, if the field is a date type. :)

    Hilary Stoupa

  • 06-10-2013 08:24 AM In reply to

    Re: Validating Date Picker with submit button

    It worked!!!! Thank you!!
Page 1 of 1 (10 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.