hi,
for create a TV without time
duplicate date.php in
/core/model/modx/processors/element/tv/renders/mgr/input/
choose the name : ex dateWithoutTime
in the code change those lines :
if ($v != '' && $v != '0' && $v != '0000-00-00 00:00:00') {
$v = strftime('%Y-%m-%d %H:%M:%S',strtotime($v));
}
by
if ($v != '' && $v != '0' && $v != '00-00-0000') {
$v = strftime('%d-%m-%Y',strtotime($v));
}
and change this last line
return $this->xpdo->smarty->fetch('element/tv/renders/input/date.tpl');
by
return $this->xpdo->smarty->fetch('element/tv/renders/input/dateWithoutTime.tpl');
and in this folder
/manager/templates/default/element/tv/renders/input/
duplicate date.tpl with this name dateWithoutTime
open dateWithoutTime.tpl
and change
<script type="text/javascript">
// <![CDATA[
{literal}
MODx.load({
{/literal}
xtype: 'xdatetime'
,applyTo: 'tv{$tv->id}'
,width: '97%'
,name: 'tv{$tv->id}'
,dateFormat: MODx.config.manager_date_format
,timeFormat: MODx.config.manager_time_format
,dateWidth: 120
,timeWidth: 120
,allowBlank: true
,value: '{$tv->value}'
{literal}
,listeners: { 'change': { fn:MODx.fireResourceFormChange, scope:this}}
});
{/literal}
// ]]>
</script>
by
<script type="text/javascript">
// <![CDATA[
{literal}
MODx.load({
{/literal}
xtype: 'datefield'
,applyTo: 'tv{$tv->id}'
,width: '97%'
,format: MODx.config.manager_date_format
,name: 'tv{$tv->id}'
,dateWidth: 120
,allowBlank: true
,value: '{$tv->value}'
{literal}
,listeners: { 'change': { fn:MODx.fireResourceFormChange, scope:this}}
});
{/literal}
// ]]>
</script>
you just create a new TV date without time