Replies
Hello Ngan,
In order to get replies more quickly I suggest you to start a new forum thread and not to write in an existing one. To the technical issue – could you provide code snippet or sample and send more details what effect exactly you would like to achieve?
Hello Arthur,
I have attached a sample presenting one possible implementation of your requirements.
Manual input could be removed by handling the keydown event of the date picker and canceling it by the preventDefault() function.
The “onclick” event of the date picker is handled and in its handler function the dropdown is shown.
I have added the code below:
<input id="datePicker" class="datePicker1" type="date" onclick="ShowDropDown()"/>
<script>
$(function () {
$("#datePicker").igDatePicker({
nullText:"",
dateInputFormat: "",
dateDisplayFormat: "d MMM",
keydown: function(evt, ui){
evt.preventDefault();
}
});
});
function ShowDropDown(){
$("#datePicker").igDatePicker("dropDownVisible", true);
}
Attached is the whole sample for your reference.
If you have any further questions or concerns don’t hesitate to contact me again.
Hello Arthur,
Thank you for posting in our community!
I have need a conformation to make sure I have correctly understand your requirement.
A sample presenting how the date picker works is attached. The calendar pops up when the user clicks the cell – as you have required. The user could choose date from the calendar.
However user could also input date manually by the keyboard as the values he enters are validated (he could not enter date as 14/34 for example).
Is it needed to disable the manual input?
Look forwards to hearing from you.
Hello Andrew,
If you have any additional questions feel free to update this thread.
Hello Andrew,
Thank you for posting in our community!
I would suggest you implementing the ColumnSettings for each of the two features:
@(Html.Infragistics()
.Grid(Model).ID(“grid1”)
.Columns(column =>
{
column.For(x => x.ProductId).HeaderText(“ID”);
column.For(x => x.Name).HeaderText(“Name”);
…
})
.Height(“300px”).Width(“800px”).PrimaryKey(“ProductId”)
.Features(feature => {
feature.Filtering().Type(OpType.Remote).ColumnSettings(setting =>
{
setting.ColumnSetting().ColumnKey(“ProductId”).AllowFiltering(false).FilterCondition(“equals”);
setting.ColumnSetting().ColumnKey(“Name”).AllowFiltering(true).FilterCondition(“endsWith”);
feature.Sorting().Type(OpType.Remote).ColumnSettings(setting =>
{
setting.ColumnSetting().ColumnKey(“Name”).AllowSorting(true);
setting.ColumnSetting().ColumnKey(“Number”).AllowSorting(false);
});
})
.DataSourceUrl(Url.Action(“PagingGetData”)).DataBind().Render())
If you have any further questions or if you need additional assistance please let me know.
Hello Kevin,
Thank you for your reply.
I will follow up on your status next week.