We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13218
    • 134 Posts
    I created the custom TV as lolotlm suggested, but of course now i have the same problem: i can select the date in the manager, but there is only a 'pick the date' button, but no output fields for the selected date.

    lolotlm seemed to have the magic change posted, but that seems to have got lost. Anybody knows?

    Thanks.
      @itWilllBeOK
      • 4172
      • 5,888 Posts
      but that seems to have got lost

      click on 'Quote' on his post and you will see his complete post
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 13218
        • 134 Posts
        Great, thanks! Works fine.

        That was kind of ... unobvious.

        Now once again, with music!

        in dateWithoutTime.tpl change:
        <input id="tv{$tv->id}" type="HIDDEN" class="datefield"
        	value="{$tv->value}" name="tv{$tv->id}"
        	onblur="MODx.fireResourceFormChange();"/>


        to
        <input id="tv{$tv->id}" type="TEXT" class="datefield"
        	value="{$tv->value}" name="tv{$tv->id}"
        	onblur="MODx.fireResourceFormChange();"/>
          @itWilllBeOK
          • 13218
          • 134 Posts
          Ok, one last problem:

          the dates format now is m/d/Y and i can't change it.

          The lines:
          $v = strftime('%d-%m-%Y',strtotime($v));

          and
          ,dateFormat: MODx.config.manager_date_format

          don't seem to have any effect.

          Any idea?
            @itWilllBeOK
            • 19328
            • 433 Posts
            Hi itWillBeOk, did you ever find a way to change the date format? For me it also changed in m/d/Y.
              • 37260
              • 8 Posts
              If anyone still interested, you need to change:
              ,dateFormat: MODx.config.manager_date_format

              to:
              ,format: MODx.config.manager_date_format


              dateFormat is specific to modx dateTime widget...

              Also here are the date formats supported by Ext JS:
              http://docs.sencha.com/ext-js/3-4/#!/api/Date
                • 40568
                • 20 Posts
                If using MODX Revo 2.2.11-pl (traditional):

                ,format: MODx.config.manager_date_format


                will not let you change date to %m-%d-%Y.

                ,dateFormat: MODx.config.manager_date_format


                seems to work fine for me.

                Now what I am trying to get is this full month display instead (%B-%d-%Y). No luck yet



                Quote from: kiguane at May 20, 2012, 09:55 AM
                If anyone still interested, you need to change:
                ,dateFormat: MODx.config.manager_date_format

                to:
                ,format: MODx.config.manager_date_format


                dateFormat is specific to modx dateTime widget...

                Also here are the date formats supported by Ext JS:
                http://docs.sencha.com/ext-js/3-4/#!/api/Date
                  • 44580
                  • 189 Posts
                  Has anyone managed to create a date TV without time for 2.3? I've had a go at it without luck - the tpl especially has changed a lot from Laurent's code and I don't really have any idea what I'm doing. Any help would be much appreciated.

                  Robert.
                    • 38314
                    • 45 Posts
                    Hi,

                    For a MIGX field :
                    Input TV Type : date
                    Configs : {"hideTime":"true"}

                    For a TV :
                    In the TV settings in Modx's Manager :
                    Options > Hide hours : yes