textTemplate

Contains the format string or callback function used for formatting the value into the date input. The default value is {0:MM/dd/yyyy h:mm tt}:

  • Format string

<input id="picker" ></input>

<script type="text/javascript">
    $(function () {
        $("#picker").shieldDateTimePicker({
            textTemplate: "{0:MM/dd/yyyy h:MM:ss TT}"
        });
    });
</script>

  • Callback function

<input id="picker" ></input>

<script type="text/javascript">
    $(function () {
        $("#picker").shieldDateTimePicker({
            textTemplate: function(item) {
				  return item.date.getFullYear() + "." + 
				  item.date.getMonth() + "." + 
				  item.date.getDate() + " " +
				  item.date.getHours() + ":" + 
				  item.date.getminutest() ;
				}
        });
    });
</script>