PerfectForms Forums » Behaviors

Date Field value not working against criteria until manually changed

(5 posts)
  • Started 2 years ago by pointreyes
  • Latest reply from pointreyes
  1. pointreyes
    Member

    I am using two date fields for holding Beginning and Ending date values for checking against a range. I have another date field that contains the current date (using 'Now' in the field settings). I determine the beginning date based on this current date with a behavior. I.e. if the current date is past the 15th then use the first day of the next month. Works great except for the fact that I have to manually change the current date field for the first day in beginning date for this to work. E.g. Today is 10/01/2009, when entering a date to check against this date - all dates past 10/01/2009 are accepted but not 10/01/2009. If I manually edit the current date even by simply deleting the 0 before the 1 (i.e. 10/1/2009) and run the behavior then 10/01/2009 is accepted. I have tried to program the current date to equal the system date but same problem - I must manually change the date before that date is accepted in the criteria.

    Any ideas on this?

    Posted 2 years ago #
  2. rgatson
    Member

    Hi Pointreyes, sorry, I was lost trying to read what is going on with your form. Would you be able to create a simple form showing your issue and email it to support@perfectforms.com.

    Thanks.

    Posted 2 years ago #
  3. pointreyes
    Member

    Actually I found the problem but cannot resolve it. When I use the system date or the "now" value in the date input field, the time is also stored in the field. Don't know why the time is stored in the "Date" input field that is what it appears to be happening. When I manually enter a date, the time is set to 0 hours 0 minutes. Therefore, when checking a date value against the current date this is what happens 10/01/2009 0:0 is < 10/01/2009 <Current Time>. I need to have the current date to have a value of 0:0 for the time in it. How do I do this? Do you need a form to see this behavior?

    Posted 2 years ago #
  4. rgatson
    Member

    Hi Pointreyes,

    I'm sorry, I'm still not sure what you are talking about to be honest, but there has to be a simpler way. Please take a look at this form as it will show you how to manipulate the date/time objects.

    http://perfectforms.com/Documentation/manual/html/fl_sample_form_using_behaviors.htm

    Thanks

    Posted 2 years ago #
  5. pointreyes
    Member

    Thanks - issue solved.

    Taking the date value and converting to text in the format of yyyy-mm-dd and then copy that value into a date field removes the time values that are in the date field when using the now value in a date field.

    Posted 2 years ago #

RSS feed for this topic

Reply

You must log in or register to post.

Contact

1917 Palomar Oaks Way
Suite 160
Carlsbad, CA 92008
866.900.8588

  picture  picture  picture  picture