Jump to content

InputfieldDatetime Showing milliseconds/Timezone ect...


Clarkey1891
 Share

Recommended Posts

<link type='text/css' href='/wire/modules/Inputfield/InputfieldDatetime/InputfieldDatetime.css?v=103' rel='stylesheet' />
<link type='text/css' href='/wire/modules/Inputfield/InputfieldCheckboxes/InputfieldCheckboxes.css?v=100' rel='stylesheet' />
<link type='text/css' href='/wire/templates-admin/styles/inputfields.css' rel='stylesheet' />
<link type='text/css' href='/wire/templates-admin/styles/JqueryUI/JqueryUI.css' rel='stylesheet' />
<link type='text/css' href='/wire/modules/Jquery/JqueryWireTabs/JqueryWireTabs.css?v=103' rel='stylesheet' />
<script type='text/javascript' src='/wire/modules/Jquery/JqueryCore/JqueryCore.js?v=162'></script>
<script type='text/javascript' src='/wire/modules/Jquery/JqueryUI/JqueryUI.js?v=180'></script>
<script type='text/javascript' src='/wire/modules/Inputfield/InputfieldDatetime/InputfieldDatetime.js?v=103'></script>
<script type='text/javascript' src='/wire/modules/Inputfield/InputfieldDatetime/timepicker/jquery-ui-timepicker-addon.js'></script>

<?php
// create a selctor for Date and time
$field = $modules->get("InputfieldDatetime");
$field->label = "Preferred appointment day";
$field->attr("id+name","preferredday");
$field->required = 1;
$field->datepicker = 1; // picker on Click
$field->dateInputFormat = 'd/m/Y';
$field->timeInputFormat = 'g:ia';
$form->append($field);
?>

sorry in advance as I'm on into my second week of learning PHP and PW if my coding is bad to say the least 

The issue I'm have is that with the above code I'm getting "Millisecond", "Microsecond","Time Zone" and "Now" Button and would like to not show these option.

also as a stretch and pushing the limits of asking for help changing the time to be a select box from 7:00AM to 4:00PM broken into half hour blocks

I've attached the whole file if it helps.

Finally I have to say it may be only a week or 2 but the support and information I have been able to find in these forums has made the process this far an easy ride

Tenant Form.php

Link to comment
Share on other sites

Worked out I had missed adding the following to the start of the code(little proud of myself)

<link type='text/css' href='/wire/modules/Inputfield/InputfieldDatetime/timepicker/jquery-ui-timepicker-addon.css' rel='stylesheet' />

as for the stretch question I've worked out if I keep the time with the date tenants won't be forced to make a choice of what time they want a person to come out. So I've decided to make a selector input field for those times

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...