Date Suggestion Tooltip

6 posts, 2 answers
  1. Premkumar
    Premkumar avatar
    10 posts
    Member since:
    May 2015

    Posted 19 Sep 2018 Link to this post

    Hi Progress Telerik,

    When I type the date 01 09 18, the tooltip suggests 18 Sep 2001.

    But when I type 01 09 2018, the tooltip suggests 01 Sep 2018.

    I want the suggestion date to be 01 Sep 2018 when I type 01 09 18.

    I'm using the CultureInfo en-US and date format dd MMM yyyy.

    Kindly assist on how to achieve the same.

     

    Thank You,

    With Best Regards,

    Muhammad Azhar Shah

  2. Answer
    Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    1013 posts

    Posted 21 Sep 2018 Link to this post

    Hi Muhammad,

    To achieve the desired result, you also need to set the DateSeparator property of the culture's DateTimeFormat to a space:

    picker.Culture.DateTimeFormat.DateSeparator = " ";

    Please let me know if this works for you.

    Regards,
    Dilyan Traykov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Premkumar
    Premkumar avatar
    10 posts
    Member since:
    May 2015

    Posted 22 Sep 2018 in reply to Dilyan Traykov Link to this post

    Hi Dilyan,

    Thank you very much. That is working as expected.

     

    Regards,

    Muhammad Azhar Shah

  4. Premkumar
    Premkumar avatar
    10 posts
    Member since:
    May 2015

    Posted 25 Sep 2018 Link to this post

    Hi Progress Telerik,

    Thank You once again for the solution given.

    There is another requirement to be fulfilled here. Whenever I type the first set of numbers then it should be interpreted as Day only, not month. After applying DateTimeFormat.DateSeparator = " ", I'm facing an issue.

    If I type 11 => suggesting as 11 Sep 2018 which is what I want.

    But when I type 11 2 => suggesting as 02 Nov 2018 which I don't want. I want the suggestion date to be 11 Feb 2018 here. Meaning that the first set of numbers should be interpreted as Day.

    Similarly, when I type 13 02 => displays error, But I want it to be 13 Feb 2018.

    Please find the attached image.

    This requirement should not disturb my previous requirement. When I type 01 09 18, it should display 01 Sep 2018.

    Hope you understand my requirements. Kindly give me a solution to fix the same.

     

    Thank You,

    With Best Regards,

    Muhammad Azhar Shah

  5. Answer
    Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    1013 posts

    Posted 25 Sep 2018 Link to this post

    Hello Muhammad,

    For the parsings you specified to work, you need to set the MonthDayPattern of the culture's DateTimeFormat:

    picker.Culture.DateTimeFormat.MonthDayPattern = "dd MM";

    Doing so provides the desired result at my end. Please let me know if that is the case for you as well.

    Regards,
    Dilyan Traykov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  6. Premkumar
    Premkumar avatar
    10 posts
    Member since:
    May 2015

    Posted 26 Sep 2018 in reply to Dilyan Traykov Link to this post

    Hi Dilyan,

    Thumbs up. Thank You.

     

    Regards,

    Muhammad Azhar Shah

Back to Top