Blank Date
Version 1.0 added 1 year ago by chriscarvache
HOW TO INSTALL: To install this package, copy the following code and paste it into your Pods >> Package Manager under the Import tab and follow instructions there.
1.0 Notes
Initial 1.0 Release
Includes an input helper (date_blank) that clears and sets the current date. Also includes a modified version of (format_date) helper that returns a customizable error message if no date is selected. Before importing this package, please delete your already existing (format_date) helper.
Includes an input helper (date_blank) that clears and sets the current date. Also includes a modified version of (format_date) helper that returns a customizable error message if no date is selected. Before importing this package, please delete your already existing (format_date) helper.
About this Package
<?php $x = '0000-00-00 00:00:00';
$currentDate = date('Y-m-d G:i:s');
if (!empty($value)) { $x = $value; }
?>
<input type="text" class="form <?php echo $coltype . ' ' . $name; ?>" id="pods_form1_<?php echo $name; ?>" value="<?php echo $x; ?>" />Use Current Date
<script type="text/javascript">
jQuery(function($){
$('.fcp_current_date[rel=' + 'pods_form1_<?php echo $name; ?>]').click(function(){
$('#pods_form1_<?php echo $name; ?>').val('<?php echo $currentDate; ?>');
});
});
</script>
$currentDate = date('Y-m-d G:i:s');
if (!empty($value)) { $x = $value; }
?>
<input type="text" class="form <?php echo $coltype . ' ' . $name; ?>" id="pods_form1_<?php echo $name; ?>" value="<?php echo $x; ?>" />Use Current Date
<script type="text/javascript">
jQuery(function($){
$('.fcp_current_date[rel=' + 'pods_form1_<?php echo $name; ?>]').click(function(){
$('#pods_form1_<?php echo $name; ?>').val('<?php echo $currentDate; ?>');
});
});
</script>
