(
app: App,
header: string,
options?: {
placeholder?: string;
defaultValue?: string;
dateFormat?: string;
},
)
| 932 | } |
| 933 | |
| 934 | public static async datePrompt( |
| 935 | app: App, |
| 936 | header: string, |
| 937 | options?: { |
| 938 | placeholder?: string; |
| 939 | defaultValue?: string; |
| 940 | dateFormat?: string; |
| 941 | }, |
| 942 | ) { |
| 943 | try { |
| 944 | const value = await VDateInputPrompt.Prompt( |
| 945 | app, |
| 946 | header, |
| 947 | options?.placeholder, |
| 948 | options?.defaultValue, |
| 949 | options?.dateFormat, |
| 950 | ); |
| 951 | if (value && value.startsWith("@date:")) { |
| 952 | const iso = value.slice(6); |
| 953 | const formatted = options?.dateFormat |
| 954 | ? formatISODate(iso, options.dateFormat) |
| 955 | : null; |
| 956 | return formatted ?? iso; |
| 957 | } |
| 958 | return value; |
| 959 | } catch (error) { |
| 960 | throwIfPromptCancelled(error); |
| 961 | return undefined; |
| 962 | } |
| 963 | } |
| 964 | |
| 965 | public static async wideInputPrompt( |
| 966 | app: App, |
nothing calls this directly
no test coverage detected