PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Date picker localisation

  1. Strada
    Member

    Hi all !
    I am trying to make a date picker localised for France.
    So that means I need my hour field range to be 0-23 and no am-pm option.

    I think it is impossible to customise the date field that way, am I right ?

    So I tried with two Number fields with carefully chosen ranges.
    I does kind of work.. but one detail is bothering me : it is displaying "Please enter a value less than or equal to 59." below the field: making it huge, in addition I don't want that text anyway (it is obvious that minutes can't go over 59)

    Is there a way of removing that line ? Using style formatting perhaps ?

    Thanks,
    Erwan

    Posted 13 years ago on Monday October 18, 2010 | Permalink
  2. you would need to target that field id and description with CSS to hide it. If you can post a link to your form, we could help you with a CSS snippet that would do it for your specific form.

    Posted 13 years ago on Monday October 18, 2010 | Permalink
  3. Strada
    Member

    Thanks Kevin,
    Here is the link: http://www.strada-dici.com/2010/07/test-gravity-form/
    The very last fields are the ones that need changing (hh and mm)

    Erwan

    Posted 13 years ago on Tuesday October 19, 2010 | Permalink
  4. looks like this is what you need. Try adding it to the end of your theme's style sheet.

    li#field_1_20 div.instruction,
    li#field_1_21 div.instruction {display:none}
    Posted 13 years ago on Tuesday October 19, 2010 | Permalink
  5. Strada
    Member

    Hello !
    It did work, thanks!
    As you can see the field is now below the normal time picker.

    Another question: Would it be possible to prevent the user to enter more than 2 number in the hh and mm boxes?
    --
    Erwan

    Posted 13 years ago on Wednesday October 20, 2010 | Permalink
  6. Yes, if you are using the single line text field type then edit your single line text field that you are using and one of the options under the Properties tab for that field type is "Maximum Characters". Set it to 2 and it will limit them to just 2 characters.

    If you are using the number field for these then you'd limit it by setting the allowable range by going to the Properties tab for the field and setting the min and max for the range. They could still enter more characters but it won't let them submit it because it wouldn't validate.

    Posted 13 years ago on Wednesday October 20, 2010 | Permalink
  7. Strada
    Member

    I am using the number field of course (I don't want the user to be able to enter characters)
    I guess I'll go with that until the Time Picker gets more flexible.

    Thank you !
    Erwan

    Posted 13 years ago on Thursday October 21, 2010 | Permalink
  8. Strada
    Member

    Sorry to bother you again, I have a css style problem.
    If I knew better about css I guess I could work this out, but I don't : )

    So here it is :
    http://www.strada-dici.com/2010/07/test-gravity-form/

    I want "Jour de Debut" and "Heure de Debut" on one line
    And "Jour de Fin" and "Heure de Fin" on the next line.

    As you can probably see "Heure de Debut" and "Heure de Fin" are composed of one html field and two number fields.

    The problem is that "Heure de Fin" and "mm" are not at the right place.

    I am using the following code :
    .TwoItems_Left {clear:both; float:left; width:50%;}
    .TwoItems_Right {float:left; width:50%;}

    .OneItem {clear:both;}

    .FirstTimeItem {float:left; width:50px;}
    .SecondTimeItem {float:left; width:50px;}

    li#field_1_20 div.instruction,
    li#field_1_21 div.instruction {display:none}
    li#field_1_23 div.instruction,
    li#field_1_24 div.instruction {display:none}

    with the following css aplied :
    "Titre de la manifestation" => 'OneItem'
    "Jour de Debut" => 'TwoItems_Left'
    "Heure de Debut" => plain html
    "hh"=> 'FirstTimeItem'
    "mm" => 'SecondTimeItem'
    "Jour de Fin" => 'Two_Items_Left'
    "Description de la manifestation" => 'OneItem'

    Thanks for your patience,
    --
    Erwan

    Posted 13 years ago on Thursday October 21, 2010 | Permalink