code sample for datetime picker