date picker to restrict dates inputed that do not match select month - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

date picker to restrict dates inputed that do not match select month

Last post 07-27-2010 05:48 AM by jayanaveen. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 11-22-2007 04:08 PM

    date picker to restrict dates inputed that do not match select month

     

    Hi

    Does anyone know how to make a date picker only allow selected dates to be inputed.  What I am looking to do is have a drop down list with all the months listed.  And when a user selects a particular month from the list, I would like the date picker to display a default begining date from that month (this I know how to do)

    And then if the user selects a date from a different month a error message to display and not to allow the user to save the form until the date is corrected.

    If anyone can help I would be much happy.

    Thank you

    James

  • 11-22-2007 11:41 PM In reply to

    Re: date picker to restrict dates inputed that do not match select month

    Put a rule on your date picker where the substring-before(datepicker,"/") does not equal the month numeric of the drop down value. Then have the action be your message or mild electric shock or whatever. :)

  • 11-24-2007 05:57 AM In reply to

    Re: date picker to restrict dates inputed that do not match select month

    Hi Clay,

    Thanks for your help again.  I was wondering if you could explain something for me.  I understand that I create  the following rule on the datepicker - substring-before(datepicker,"/") and I understand how to set an action as a message but I am not sure how I tell the date picker that it should not equal to the month numeric of the drop down value.  Would you be able to explain this to me.    

    Thank you

     James

    Filed under: , ,
  • 11-26-2007 08:02 AM In reply to

    Re: date picker to restrict dates inputed that do not match select month

    I would setup your month picker dropdown so that the value is the numeric and the label is the text.  So January would be the label and 1 the value.  That makes it easy to set or compare the month value with the user's selection. So a user selects january you would set your date picker to concat(dropdown, "/01/07") via a rule. This sets it to the first of that month and then when they click the date picker it is on that month.  Then the rule on the datepicker would validate they picked a date from that month.

    That is how I would do it.

  • 07-27-2010 05:48 AM In reply to

    Re: date picker to restrict dates inputed that do not match select month

    Hi,

    My scenario is , I have 31 datepickers in my infopath form. i need to make sure that all 31 controls should have unique dates. any workaround to do this. m using infopath 2003 SP1.

     

    Thanks in Advance.

    Naveen .

     

     

     

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