+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Events Date Search

Events Date Search

2 posts, 0 answered
  1. Asif
    Asif avatar
    110 posts
    Registered:
    18 Nov 2010
    15 Jan 2011
    Link to this post
    Hi,
    I want to search the event filter by it's date. Following code I am using for it. for example the date is showing "Wednesday, December 01, 2010" if I write keyword as "december" it is not pulling record.

    IList getEvents = listOfContentItems.Cast<IContent>().Where(p => p.GetMetaData("Title").ToString().ToLower().Contains(Keyword.Text.ToLower()) || p.Content.ToString().ToLower().Contains(Keyword.Text.ToLower()) || p.GetMetaData("Publication_Date").ToString().ToLower().Contains(Keyword.Text.ToLower())).ToList();

    this ascx code is displaying date however i am using an external template "ContentViewItemView.ascx"

    <telerik:DateTimeLiteral runat="server" ID="Publication_Date" DateFormatString="D"></telerik:DateTimeLiteral>
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    18 Jan 2011
    Link to this post
    Hello Asif,

    The publication date is set as a date time value. Could you check what p.GetMetaData("Publication_Date").ToString().ToLower() returns itself.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered