- Home
- Forum
- ASP.NET Web Forms (Classic)
- visualizar minutos entre horas
visualizar minutos entre horas
Buendo Dias
Attachment: preguntaSyn_9cfcf3ae.zip
Te pregunto existe alguna posibilidad que cuando se haga la escala de tiempo(http://asp.syncfusion.com/demos/web/schedule/timescale.aspx), no solo marque las horas sino tambien los minutos, no tiene que ser todas pueden ser solo las :30
Adjunto imagen de como creo que se veria y cualquier duda me comentan
Gracias
Attachment: preguntaSyn_9cfcf3ae.zip
SIGN IN To post a reply.
3 Replies
KK
Karthigeyan Krishnamurthi
Syncfusion Team
January 31, 2018 07:25 AM UTC
Hi Veronica,
Thank you for contacting Syncfusion support.
Template option can be used to customize the major & minor slot values and for the same we have prepared the below sample.
<Code>
<ej:Schedule ID="Schedule1" ClientIDMode="Static" Height="525px" Width="100%" CurrentDate="5/5/2014" runat="server" DataSourceID="SqlDataSource1">
<TimeScale MinorSlotCount="4" MajorSlot="60" MajorSlotTemplateId="#majorTemplate" MinorSlotTemplateId="#minorTemplate" />
<AppointmentSettings Id="Id" Subject="Subject" AllDay="AllDay" StartTime="StartTime" EndTime="EndTime" Recurrence="Recurrence" RecurrenceRule="RecurrenceRule" />
</ej:Schedule>
<!-- Template for Majorslot -->
<script id="majorTemplate" type="text/x-jsrender">
<div>{{:~major(date)}}</div>
</script>
<!-- Template for Minorslot -->
<script id="minorTemplate" type="text/x-jsrender">
<div>{{:~minor(date)}}</div>
</script>
<script type="text/javascript">
function _majorFormat(date) {
var tFormat = ej.format(new Date(date), "hh tt");
return tFormat;
}
$.views.helpers({ major: _majorFormat });
function _minorFormat(date) {
var dFormat = ej.format(new Date(date), "mm");
return dFormat;
}
$.views.helpers({ minor: _minorFormat });
</script>
</Code>
Regards,
Karthigeyan
Hi Veronica,Thank you for contacting Syncfusion support.Template option can be used to customize the major & minor slot values and for the same we have prepared the below sample.<Code><ej:Schedule ID="Schedule1" ClientIDMode="Static" Height="525px" Width="100%" CurrentDate="5/5/2014" runat="server" DataSourceID="SqlDataSource1"><TimeScale MinorSlotCount="4" MajorSlot="60" MajorSlotTemplateId="#majorTemplate" MinorSlotTemplateId="#minorTemplate" /><AppointmentSettings Id="Id" Subject="Subject" AllDay="AllDay" StartTime="StartTime" EndTime="EndTime" Recurrence="Recurrence" RecurrenceRule="RecurrenceRule" /></ej:Schedule><!-- Template for Majorslot --><script id="majorTemplate" type="text/x-jsrender"><div>{{:~major(date)}}</div></script><!-- Template for Minorslot --><script id="minorTemplate" type="text/x-jsrender"><div>{{:~minor(date)}}</div></script><script type="text/javascript">function _majorFormat(date) {var tFormat = ej.format(new Date(date), "hh tt");return tFormat;}$.views.helpers({ major: _majorFormat });function _minorFormat(date) {var dFormat = ej.format(new Date(date), "mm");return dFormat;}$.views.helpers({ minor: _minorFormat });</script></Code>Regards,Karthigeyan
Le agradezco la respuesta
te hago otra pregunta yo tengo dividido el Time Scale cada 5 minutos y cuando le pongo los minutos se me ve acumulado (adjunto imagen )
existe la posibilidad de solo ver la hora y el 30 (lo de color rojo en la imagen )
gracias
Attachment: timescale_202aec3f.zip
KK
Karthigeyan Krishnamurthi
Syncfusion Team
February 5, 2018 06:25 PM UTC
Hi Veronica,
Thanks for your update.
Kindly use the below code example in our previous sample to display the minor slot with only 30 minutes values.
<Code>
<timescale minorslotcount="4" majorslot="60" majorslottemplateid="#majorTemplate" minorslottemplateid="#minorTemplate" />
<!-- Template for Minorslot -->
<script id="minorTemplate" type="text/x-jsrender">
<div>{{:~minor(date)}}</div>
</script>
<script>
function _minorFormat(date) {
var dFormat = ej.format(new Date(date), "mm");
return dFormat == 30 ? dFormat : "";
}
$.views.helpers({ minor: _minorFormat });
</script>
</Code>
Regards,
Karthigeyan
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
VO veronica orozco
- Jan 31, 2018 01:46 AM UTC
- Feb 5, 2018 06:25 PM UTC