Results 1 to 9 of 9

Thread: Member and the date of birth

  1. #1
    User
    Join Date
    09-15-09.
    Location
    France
    Posts
    98

    Ausrufezeichen Member and the date of birth

    Hi,

    I find a bug in 3.3.6 to select the date of birth of member

    Is impossible in front end to select an older date as the date of the day
    it's pity to select a date of birth

    I don't see the solution in the Contao Changelog

  2. #2
    User
    Join Date
    09-15-09.
    Location
    France
    Posts
    98

  3. #3
    New user cliffen's Avatar
    Join Date
    10-18-13.
    Location
    Lüneburg
    Posts
    22

    Default

    How do you add the calendar to the form field. Are you using an extension?

    In the JS Code for the initialization there is a 'minDate' defined.
    Extensions :: Github :: No support via PM.

  4. #4
    User
    Join Date
    09-15-09.
    Location
    France
    Posts
    98

    Default

    Quote Originally Posted by cliffen View Post
    How do you add the calendar to the form field. Are you using an extension?

    In the JS Code for the initialization there is a 'minDate' defined.
    I have 'mindate' but is a date of the day


    Code:
    window.addEvent('domready', function() {
      new Picker.Date($$('#ctrl_dateOfBirth'), {
        'draggable': 'false',
        'pickerClass': 'datepicker_bootstrap',
        'useFadeInOut': '!Browser.ie',
        'startDay': 0,
        'titleFormat': '%B %d%o, %Y',
        'minDate': new Date(2015, 1, 11),
        'positionOffset': {x:0,y:0},
        'format': '%d-%m-%Y'
      });
    });
    Last edited by tom-over; 02/13/2015 at 11:14.

  5. #5
    New user cliffen's Avatar
    Join Date
    10-18-13.
    Location
    Lüneburg
    Posts
    22

    Default

    Yep, "minDate" has to be removed ... howsoever it was added.

    There is more discussed in the german commnuity board: https://community.contao.org/de/show...417#post358417
    Extensions :: Github :: No support via PM.

  6. #6
    User Andreas's Avatar
    Join Date
    07-11-09.
    Location
    Mönchengladbach
    Posts
    499

    Default

    Quote Originally Posted by tom-over View Post
    ...
    new Picker.Date($$('#ctrl_dateOfBirth'), {
    ...
    Correct mootools selector for element with ID is
    $('ctrl_dateOfBirth')
    http://mootools.net/core/docs/1.5.1/...#Window:dollar
    Web-Development, Freelancer, Burgtech, XHTML, HTML5, CSS, PHP, Javascript, MooTools, MySQL and more
    Amazon wishlist

  7. #7
    User
    Join Date
    09-15-09.
    Location
    France
    Posts
    98

    Default

    Ok thanks,

    I find the place to update line 169 in FormCalendarField.php

    Code:
    <script>
    window.addEvent('" . $jsEvent . "', function() {
      new Picker.Date($('#ctrl_" . $this->strId . "'), {
    " . implode(",\n", $arrCompiledConfig) . "
      });
    });
    </script>";
    
    But i always have a error message : Please enter a date in the future (including today).
    Last edited by tom-over; 02/13/2015 at 11:14.

  8. #8
    Official Contao Team andreas.schempp's Avatar
    Join Date
    06-10-09.
    Posts
    63

    Default

    What does your DCA configuration look like?
    terminal42 gmbh
    We are Contao Premium-Partner! For Isotope eCommerce support check out the Isotope Circle.

  9. #9
    User
    Join Date
    09-15-09.
    Location
    France
    Posts
    98

    Default

    In DCA tl_member of this modules, I juste have :
    Code:
    $GLOBALS['TL_DCA']['tl_member']['fields']['dateOfBirth']['inputType'] = 'calendar';
    i delete this code in FormCalendarField.php and is ok for the moment :
    Code:
    /*case '+0':
            if ($intTstamp < $objToday->dayBegin) {
                $this->addError($GLOBALS['TL_LANG']['ERR']['calendarfield_direction_+0']);
            }
     break;*/

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •