Skip to content
On this page

CUI design

Usage

DatePicker component allows users to input or select a date using natural language in conversational interactions. It can recognize various ways of describing a date, such as the day of the week, day of the month, and date of the year, and will interact with the user to finalize a specific date. It is suitable for the context in which it appears.

Common use cases include:

  • Making a restaurant reservation.
  • Scheduling a meeting.

Common interaction logics include:

  • Ask for a date.
  • Provide date options and help to shrink candidate dates.
  • Pass business logic verification.
  • Inform or double check with end-user the date value.

Schema representation

When the bot is making value recommendations, the auxiliary slots below can help the user to finalize a specific date through interaction.

Main slot

Slot LabelTypeDescriptionExpression Input
datejava.time.LocalDateAlways ask. Matches a certain calendar date."today", "this monday", "the 14th of February", "April 14, 2023", "2023-01-18", "the last Tuesday of October 2022"

Auxiliary slots

Slot LabelTypeDescriptionExpression Input
dayOfWeekjava.time.DayOfWeekThe 7 days of the week, from 1 (Monday) to 7 (Sunday)."monday"
monthjava.time.MonthMonth of a year, from 1 (January) to 12 (December)."January"
monthDayjava.time.MonthDayA month-day in the ISO-8601 calendar system, the combination of a month and day-of-month."15th February", "15 of February", "the 15th of February"
yearjava.time.YearA year in the ISO-8601 calendar system.2023
yearMonthjava.time.YearMonthA year-month in the ISO-8601 calendar system, the combination of a year and month."October 2023"
periodjava.time.PeriodThe quantity or amount of time in terms of years, months and days."4 days", "coming week", "next month", "this quarter"

Contextual snippet

1. Happy path

Snippet 1Happy Path
DescriptionDefines what happens if everything goes well.
Preconditioncomplete = false
Annotated Conversation
  • 🤖 : Which date would you like?
      - 2023-01-19
      - 2023-01-20
      - 2023-01-21
  • 😊 : Jan 19.
  • 🤖 : Get, your date is 2023-01-19.
End State
  • date = 2023-01-19
  • complete = true

2. Date value can NOT pass verification

Snippet 2Date Value Can NOT Pass Verification
DescriptionAfter the user specifies a date, the date does not pass validation. Bot prompts the verification failure message and asks the user again.
Preconditioncomplete = false
Annotated Conversation
  • 😊 : Jan 19.
  • 🤖 : The date is not available. Which date would you like?
      - 2023-01-20
      - 2023-01-21
      - 2023-01-22
End Statecomplete = false

3. User provides partial inform

Snippet 3User Provides Partial Inform
DescriptionAfter the bot provides candidates, the user proposes some conditions to narrow down the available options.
Preconditioncomplete = false
Annotated Conversation
  • 🤖 : Which date would you like?
      - 2023-01-19
      - 2023-01-20
      - 2023-01-21
  • 😊 : mon or tues.
  • 🤖 : Here are some optins for you:
      - 2023-01-23
      - 2023-01-24
      - 2023-01-30
      - 2023-01-31
End Statecomplete = false

4. User change mind

Snippet 4User Change Mind
DescriptionAfter the date determined by the user, the user changes his mind.
Precondition
  • date = 2023-01-19
  • complete = true
Annotated Conversation
  • 😊 : Wait, I think Jan 30 is better.
  • 🤖 : Get, your date is changed to 2023-01-30.
End State
  • date = 2023-01-30
  • complete = true