On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • 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
    • 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!
      • 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
        • 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
          • Hi itWillBeOk, did you ever find a way to change the date format? For me it also changed in m/d/Y.
            • 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
              • 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
                • 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.
                  • 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