- Home
- Forum
- ASP.NET Core - EJ 2
- DateTimePicker no time selection available
DateTimePicker no time selection available
Hi Guys,
I am trying to implement a date time picker edit see below, it does not show time icon , i copied date time picker from your example but cannot get it to work using latest Syncfusion Libs
Regards
Edmund Herbert
<div class="container">
<div class="row">
<div class="col-sm-2">
<img src="/Images/Logo.png" alt="Track-Tech Logo" width="150" height="100"><h5 class="col-sm-4" style="margin: 12px">Tasks</h5>
</div>
</div>
<div class="row">
<div class="col-sm-10">
<ejs-grid id="Grid" height="272" enablePersistence="true" allowPaging="true" actionComplete="saveData" allowSorting="true" gridLines="Both" allowResizing="true" toolbar="@(new List<string>() {"Search", "Add", "Edit", "Delete", "Update", "Cancel"})" allowFiltering="true" allowSelection="true">
<e-data-manager json="@ViewBag.dataSource" adaptor="RemoteSaveAdaptor" insertUrl="/Task/Insert" updateUrl="/Task/Update" removeUrl="/Task/Delete"></e-data-manager>
<e-grid-filterSettings type="Excel"></e-grid-filterSettings>
<e-grid-editSettings allowAdding="true" allowDeleting="true" showDeleteConfirmDialog="true" allowEditing="true" mode="Normal"></e-grid-editSettings>
<e-grid-pagesettings pageSizes="@(new string[] {"5", "10"})"></e-grid-pagesettings>
<e-grid-selectionsettings type="Single"></e-grid-selectionsettings>
<e-grid-columns>
<e-grid-column field="TaskId" headerText="TaskId" visible="false" isPrimaryKey="true" isIdentity="true"></e-grid-column>
<e-grid-column field="TaskName" headerText="Task Name" width="120" validationRules="@(new {required = true})"></e-grid-column>
<e-grid-column field="Description" headerText="Description" width="120"></e-grid-column>
<e-grid-column field="TakeOnDate" headerText="Date Created" validationRules="@(new {required = true})" editType="datetimepickeredit" customFormat="@(new {type = "datetime", format = "M/d/y hh:mm a" })" width="160"></e-grid-column>
</e-grid-columns>
</ejs-grid>
<div class="col-sm-10" style="margin: 2px">
<ejs-button id="home" content="ome" cssClass="e-custom-home e-icons e-home-icon"></ejs-button>
</div>
<div class="row">
<div class="col-lg-12 control-section toast-default-section">
<div class="control_wrapper">
<ejs-toast id="toast_type" created="created" timeOut=5000 ShowProgressBar="true" close="recordExists">
<e-toast-position X="Right"></e-toast-position>
</ejs-toast>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-2">
<img src="/Images/Logo.png" alt="Track-Tech Logo" width="150" height="100"><h5 class="col-sm-4" style="margin: 12px">Tasks</h5>
</div>
</div>
<div class="row">
<div class="col-sm-10">
<ejs-grid id="Grid" height="272" enablePersistence="true" allowPaging="true" actionComplete="saveData" allowSorting="true" gridLines="Both" allowResizing="true" toolbar="@(new List<string>() {"Search", "Add", "Edit", "Delete", "Update", "Cancel"})" allowFiltering="true" allowSelection="true">
<e-data-manager json="@ViewBag.dataSource" adaptor="RemoteSaveAdaptor" insertUrl="/Task/Insert" updateUrl="/Task/Update" removeUrl="/Task/Delete"></e-data-manager>
<e-grid-filterSettings type="Excel"></e-grid-filterSettings>
<e-grid-editSettings allowAdding="true" allowDeleting="true" showDeleteConfirmDialog="true" allowEditing="true" mode="Normal"></e-grid-editSettings>
<e-grid-pagesettings pageSizes="@(new string[] {"5", "10"})"></e-grid-pagesettings>
<e-grid-selectionsettings type="Single"></e-grid-selectionsettings>
<e-grid-columns>
<e-grid-column field="TaskId" headerText="TaskId" visible="false" isPrimaryKey="true" isIdentity="true"></e-grid-column>
<e-grid-column field="TaskName" headerText="Task Name" width="120" validationRules="@(new {required = true})"></e-grid-column>
<e-grid-column field="Description" headerText="Description" width="120"></e-grid-column>
<e-grid-column field="TakeOnDate" headerText="Date Created" validationRules="@(new {required = true})" editType="datetimepickeredit" customFormat="@(new {type = "datetime", format = "M/d/y hh:mm a" })" width="160"></e-grid-column>
</e-grid-columns>
</ejs-grid>
<div class="col-sm-10" style="margin: 2px">
<ejs-button id="home" content="ome" cssClass="e-custom-home e-icons e-home-icon"></ejs-button>
</div>
<div class="row">
<div class="col-lg-12 control-section toast-default-section">
<div class="control_wrapper">
<ejs-toast id="toast_type" created="created" timeOut=5000 ShowProgressBar="true" close="recordExists">
<e-toast-position X="Right"></e-toast-position>
</ejs-toast>
</div>
</div>
</div>
</div>
</div>
</div>
SIGN IN To post a reply.
6 Replies
1 reply marked as answer
VS
Vignesh Sivagnanam
Syncfusion Team
November 2, 2020 11:30 AM UTC
Hi Edmund
Thanks for Contacting Syncfusion support
Based on your reported problem, we have prepared the sample based on the query, we are not able to reproduce your reported problem at our end.
For your convenience we have attached the sample and please refer the sample from the below link.
Screenshot for your reference :
We need some additional details to validate the reported issue at our end. So kindly share the following details.
- Share your exact replication procedure of issue that you facing.
- Please share your issue scenario in video demonstration format.
- If possible try to reproduce the faced issue in the provided sample.
- Share the Hosted link for the sample.
Above requested details will be helpful for us to reproduce and analyze the reported issue at our end and provide solution as soon as possible.
Regards
Vignesh Sivagnanam
EH
Edmund Herbert
November 2, 2020 02:07 PM UTC
Hi Vignesh Sivagnanam ,
The example that you sent me is net core 2.0 I am using core 3.1 please test with core 3.1 and I am using bootstrap 4
Regards
Edmund Herbert
EH
Edmund Herbert
November 3, 2020 07:11 PM UTC
Hi any news on Date Time Picker Edit using core 3.1
Regards
Edmund Herbert
TS
Thiyagu Subramani
Syncfusion Team
November 4, 2020 10:48 AM UTC
Hi Edmund ,
Thanks for your update.
Based on your shared information we have prepared sample using core 3.1. Please refer it below.
Sample link: https://www.syncfusion.com/downloads/support/forum/159298/ze/WebApplication1-1733644429.zip
Please get back to us, if you need any further assistance.
Regards,
Thiyagu S
Marked as answer
EH
Edmund Herbert
November 5, 2020 06:42 AM UTC
Hi thanks for working demo, just some feedback issue was I set persistence to true, this made control only show date and no time selection, by removing issue resolved
Regards
Edmund Herbert
TS
Thiyagu Subramani
Syncfusion Team
November 6, 2020 10:27 AM UTC
Hi Edmund,
Thanks for your update.
Based on your shared information we suspect that your reported issue may occurs window’s local Storage. By default, State persistence refers to the Grid’s state maintained in the browser’s localStorage even if the browser is refreshed or if you move to the next page within the browser. State persistence stores grid’s model object in the local storage when the EnablePersistence is defined as true.
If the EnablePersistence property is set to true, the grid property value is saved in the window.localStorage for reference. You can get/set the localStorage value by using the getItem/setItem method in the window.localStorage.
//get the Grid model.
|
var value = window.localStorage.getItem('gridPersistGrid'); //"gridPersistGrid" is component name + component id.
var model= JSON.parse(value); |
//set the Grid model.
|
window.localStorage.setItem('gridPersistGrid', JSON.stringify(value)); //" gridPersistGrid " is component name(grid) + component id (PersistGrid). |
For more information please refer to the below link.
So, to achieve this requirement we suggest clear window.localStroage or change the persisting variable (change grid’s component id because by default grid properties are stored based on its id) or open your application in private window and check it.
Please get back to us, if you need any further assistance.
Regards,
Thiyagu S
SIGN IN To post a reply.
- 6 Replies
- 3 Participants
- Marked answer
-
EH Edmund Herbert
- Nov 1, 2020 05:39 PM UTC
- Nov 6, 2020 10:27 AM UTC