This repository contains a Go implementation of a terminal-based hour selector model using the Bubble Tea framework. The model allows users to increment and decrement hours, minutes, and seconds, and navigate between them using keyboard input. It’s designed to be a simple and intuitive component for terminal user interfaces (TUIs).
To install the package, run the following command:
go get github.com/lcc/bubble-datetime-pickerFirst, import the package in your Go project:
import (
"github.com/lcc/bubble-datetime-picker"
)You can initialize the dateAndHourModel and use it in your Bubble Tea application:
model := NewDateAndHourModel()Here’s a basic example of how to integrate the datetime picker into your Bubble Tea program:
package main
import (
"fmt"
tea "github.com/charmbracelet/bubbletea"
dtPicker "github.com/lcc/bubble-datetime-picker"
)
func main() {
p := tea.NewProgram(dtPicker.NewDateAndHourModel())
if err := p.Start(); err != nil {
fmt.Println("Error running program:", err)
}
}Contributions are welcome! If you find a bug or have a feature request, please open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for more details.
Special thanks to the Bubble Tea framework for providing an excellent foundation for building terminal UIs. A huge shoutout to Ethan Fung and his calendar UI for laying the groundwork that made this project possible. Your contributions have been invaluable in bringing this datetime picker to life.

